Files
ebiz-h5/src/components/common/DestroyablePopup.vue
hz 344a2f4b63 fix(product): 调整保费试算弹窗样式及布局
- 移除 CalculatePremium 组件容器的 pb100 类
- 修改红色指示条宽度从10px 到 5px
- 为保费试算弹窗添加最大高度限制 (max-height:90vh)
2025-11-07 18:26:48 +08:00

30 lines
634 B
Vue

<script>
export default {
name: 'DestroyablePopup',
data() {
return {
isPopupOpen: this.show, isDestroyPopup: false
}
},
watch: {
isPopupOpen(val) {
this.isPopupOpen = val
this.$emit('update:show', val)
},
show() {
if (this.show) this.isDestroyPopup = false
this.$nextTick(() => this.isPopupOpen = this.show)
}
},
props: ['show']
}
</script>
<template>
<div v-if="!isDestroyPopup" style="max-height: 90vh">
<van-popup v-model="isPopupOpen" round position="bottom" @closed="()=>{isDestroyPopup = true}">
<slot></slot>
</van-popup>
</div>
</template>