2024-01-31 06:48:01 +00:00
|
|
|
<template>
|
2024-07-31 15:37:10 +00:00
|
|
|
<tpx-dialog :show="show" :title="title" @onClose="handleCloseModal()" rootStyle="min-height:auto;"
|
|
|
|
|
:contentStyle="contentStyle"
|
|
|
|
|
>
|
2024-06-11 09:35:55 +00:00
|
|
|
<view :style="cptStyle">
|
2024-01-31 06:48:01 +00:00
|
|
|
<tpx-layout>
|
|
|
|
|
<template v-slot:body>
|
2024-07-31 15:37:10 +00:00
|
|
|
<view class="pl-30 pr-30">
|
|
|
|
|
<slot v-if="show" :value="submitVals"></slot>
|
|
|
|
|
</view>
|
2024-01-31 06:48:01 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:footer>
|
|
|
|
|
<view class="blcok-white-noradius" style="margin-top: 0;margin-bottom: 0;">
|
|
|
|
|
<u-button @click="handleSubmitValue()" type="primary" size="large" shape="circle"
|
|
|
|
|
custom-style="height:80rpx;font-size: 30rpx;"
|
|
|
|
|
>确认</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
</tpx-layout>
|
|
|
|
|
</view>
|
|
|
|
|
</tpx-dialog>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
export default {
|
2024-06-11 09:35:55 +00:00
|
|
|
computed:{
|
|
|
|
|
cptStyle(){
|
|
|
|
|
let sty = `position: relative;height: calc(${this.percentHeight}vh);`
|
|
|
|
|
return sty
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-01-31 06:48:01 +00:00
|
|
|
components: { },
|
|
|
|
|
watch: {
|
|
|
|
|
show(v){
|
|
|
|
|
if(v) {
|
|
|
|
|
this.submitVals = JSON.parse(JSON.stringify(this.value))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
props: {
|
|
|
|
|
title: {
|
|
|
|
|
default () {
|
|
|
|
|
return ''
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-07-31 15:37:10 +00:00
|
|
|
contentStyle: {
|
|
|
|
|
default () {
|
|
|
|
|
return 'padding:0;'
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-01-31 06:48:01 +00:00
|
|
|
percentHeight: {
|
|
|
|
|
default () {
|
|
|
|
|
return 60
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
show: {
|
|
|
|
|
default () {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
value: {
|
|
|
|
|
default () {
|
|
|
|
|
return {
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-06-13 08:08:39 +00:00
|
|
|
},
|
|
|
|
|
okCloseModal: {
|
|
|
|
|
default () {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
},
|
2024-01-31 06:48:01 +00:00
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
submitVals: {}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
onHide() {
|
|
|
|
|
},
|
|
|
|
|
unmounted() {
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
handleCloseModal() {
|
|
|
|
|
this.$emit('update:show', false)
|
2024-05-31 10:42:15 +00:00
|
|
|
this.$emit('onClose')
|
2024-01-31 06:48:01 +00:00
|
|
|
},
|
|
|
|
|
handleSubmitValue() {
|
|
|
|
|
const val = this.submitVals
|
|
|
|
|
this.$emit('onSure', val)
|
|
|
|
|
this.$emit('update:value', val)
|
2024-06-13 08:08:39 +00:00
|
|
|
this.okCloseModal && this.handleCloseModal()
|
2024-01-31 06:48:01 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.shet-cont{
|
|
|
|
|
padding: 10rpx 0 30rpx 0;
|
|
|
|
|
}
|
|
|
|
|
.jsfm-item{
|
|
|
|
|
margin-top: 30rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</style>
|