This commit is contained in:
aihe 2024-12-05 23:21:25 +08:00
parent b2bf3a43a7
commit 2116b786a4

View File

@ -1,9 +1,13 @@
<template> <template>
<tpx-dialog :show="show" :title="title" @onClose="handleCloseModal()" rootStyle="min-height:auto;"> <tpx-dialog :show="show" :title="title" @onClose="handleCloseModal()" rootStyle="min-height:auto;"
:contentStyle="contentStyle"
>
<view :style="cptStyle"> <view :style="cptStyle">
<tpx-layout> <tpx-layout>
<template v-slot:body> <template v-slot:body>
<slot v-if="show" :value="submitVals"></slot> <view v-if="contShow" class="pl-30 pr-30">
<slot :value="submitVals"></slot>
</view>
</template> </template>
<template v-slot:footer> <template v-slot:footer>
@ -33,6 +37,10 @@
if(v) { if(v) {
this.submitVals = JSON.parse(JSON.stringify(this.value)) this.submitVals = JSON.parse(JSON.stringify(this.value))
} }
setTimeout(()=> {
// 防止 弹框内容组件不更新、有缓存
this.contShow = v
}, 350)
} }
}, },
props: { props: {
@ -41,6 +49,11 @@
return '' return ''
} }
}, },
contentStyle: {
default () {
return 'padding:0;'
}
},
percentHeight: { percentHeight: {
default () { default () {
return 60 return 60
@ -65,6 +78,7 @@
}, },
data() { data() {
return { return {
contShow: false,
submitVals: {} submitVals: {}
} }
}, },