emis-sapp/components/tpx-com-dialog/tpx-com-dialog.vue

88 lines
1.6 KiB
Vue
Raw Normal View History

2023-12-17 15:28:03 +00:00
<template>
<tpx-dialog type="type-dialog" :show="show" :title="title" @onClose="handleCloseModal">
<view style="position: relative;min-height: 360rpx; width: 500rpx;display:flex;flex-direction: column;padding: 0 10rpx 10rpx 10rpx;">
<u-row custom-style="flex: 1;" align="center">
<slot name="body">
</slot>
</u-row>
<view class="pd-20" >
<u-row justify="between">
<u-button @click="handleBtnCheck('no')" size="large" shape="circle"
custom-style="height:80rpx;font-size: 30rpx;width:45%;margin:0;">
{{cancelText}}
</u-button>
<u-button @click="handleBtnCheck('yes')" type="primary" size="large" shape="circle"
custom-style="height:80rpx;font-size: 30rpx;width:45%;margin:0;">
{{sureText}}
</u-button>
</u-row>
</view>
</view>
</tpx-dialog>
</template>
<script>
export default {
// computed: {
// filDataList() {
// return []
// },
// },
props: {
title: {
default () {
return ''
}
},
show: {
default () {
return false
}
},
cancelText: {
default () {
return '取消'
}
},
sureText: {
default () {
return '确认'
}
},
},
data() {
return {
}
},
created() {
},
onHide() {
},
destroyed() {},
methods: {
handleCloseModal() {
this.$emit('update:show', false)
},
handleBtnCheck(type) {
if(type == 'yes') {
this.$emit('onSure')
} else {
this.handleCloseModal()
this.$emit('onClose')
}
}
}
}
</script>
<style scoped lang="scss">
</style>