54 lines
1.0 KiB
Vue
54 lines
1.0 KiB
Vue
|
|
<template>
|
||
|
|
<el-dialog class="dialog-container"
|
||
|
|
:model-value="modelValue"
|
||
|
|
:title="title"
|
||
|
|
:before-close="close" :destroy-on-close="true"
|
||
|
|
|
||
|
|
>
|
||
|
|
|
||
|
|
<slot></slot>
|
||
|
|
<template #footer v-if="showFooter">
|
||
|
|
<div class="dialog-footer" >
|
||
|
|
<el-button @click="close">取消</el-button>
|
||
|
|
<el-button type="primary" @click="submit">
|
||
|
|
确认
|
||
|
|
</el-button>
|
||
|
|
</div>
|
||
|
|
</template>
|
||
|
|
</el-dialog>
|
||
|
|
</template>
|
||
|
|
|
||
|
|
<script setup>
|
||
|
|
import {ref} from 'vue'
|
||
|
|
const props=defineProps({
|
||
|
|
modelValue: {
|
||
|
|
type: Boolean,
|
||
|
|
required: true
|
||
|
|
},title:{
|
||
|
|
type:String,
|
||
|
|
default:'提示'
|
||
|
|
},showFooter:{
|
||
|
|
type:Boolean,
|
||
|
|
default:true
|
||
|
|
}
|
||
|
|
|
||
|
|
})
|
||
|
|
const emit=defineEmits(['update:modelValue','submit','close'])
|
||
|
|
const close = () => {
|
||
|
|
emit('update:modelValue',false)
|
||
|
|
emit('close')
|
||
|
|
}
|
||
|
|
const submit=()=>{
|
||
|
|
emit('submit')
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<style lang="scss" scoped>
|
||
|
|
@import "@/assets/css/homeScreen.scss";
|
||
|
|
::v-deep .el-dialog__body{
|
||
|
|
padding-top: 0 !important;
|
||
|
|
padding-bottom: 0 !important;
|
||
|
|
}
|
||
|
|
|
||
|
|
</style>
|