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>
<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">
<tpx-layout>
<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 v-slot:footer>
@ -33,6 +37,10 @@
if(v) {
this.submitVals = JSON.parse(JSON.stringify(this.value))
}
setTimeout(()=> {
// 防止 弹框内容组件不更新、有缓存
this.contShow = v
}, 350)
}
},
props: {
@ -41,6 +49,11 @@
return ''
}
},
contentStyle: {
default () {
return 'padding:0;'
}
},
percentHeight: {
default () {
return 60
@ -65,6 +78,7 @@
},
data() {
return {
contShow: false,
submitVals: {}
}
},