<template>
    <van-popup v-model:show="showPop" round :style="{ padding: '64px' }" @close="handlePopupClose">
        <div>
            <p>搜索弹窗的内容</p>
        </div>
    </van-popup>
</template>

<script setup>
import { ref, watch, defineProps, defineEmits } from 'vue';

const props = defineProps({
    showSearchPop: Boolean
});

// const props = defineProps(['showSearchPop']);

const emit = defineEmits(['update:showSearchPop']);


const showPop = ref(props.showSearchPop);

// 监听 props 的变化，更新 showPop 的值
watch(() => props.showSearchPop, (newValue) => {
  showPop.value = newValue;
});

// 处理弹窗关闭事件，更新 showSearchPop 的值
const handlePopupClose = () => {
  emit('update:showSearchPop', false);
};

</script>

<style scoped>
/* 这里可以添加样式 */
</style>