修复编辑弹框缓存问题

This commit is contained in:
aihe 2024-12-05 23:18:21 +08:00
parent ac38ceb756
commit f4024cc7cc

View File

@ -5,8 +5,8 @@
<view :style="cptStyle">
<tpx-layout>
<template v-slot:body>
<view class="pl-30 pr-30">
<slot v-if="show" :value="submitVals"></slot>
<view v-if="contShow" class="pl-30 pr-30">
<slot :value="submitVals"></slot>
</view>
</template>
@ -37,6 +37,10 @@
if(v) {
this.submitVals = JSON.parse(JSON.stringify(this.value))
}
setTimeout(()=> {
// 防止 弹框内容组件不更新、有缓存
this.contShow = v
}, 350)
}
},
props: {
@ -74,6 +78,7 @@
},
data() {
return {
contShow: false,
submitVals: {}
}
},