smart-power-ui/src/components/DialogTemplate/index.vue

85 lines
1.6 KiB
Vue

<template>
<div class="app-container dialog-bit">
<el-dialog class="eldialog-wrap-t" @close="close" :title="title" :close-on-click-modal="false" append-to-body :visible.sync="visible" :width="width">
<slot name="dialog-center"></slot>
<div slot="footer" class="dialog-footer">
<slot name="dialog-footer"></slot>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'dialogTemplate',
props: {
title: {
type: String
},
visible: {
type: Boolean,
default: false
},
width: {
type: String,
default() {
return '450px'
}
}
},
methods: {
close() {
console.log('close0--')
this.$emit('close')
}
},
}
</script>
<style lang="scss" >
.dialog-bit {
.eldialog-wrap-t {
.el-dialog__header {
border-bottom: 1px solid #747373;
}
.el-dialog__body {
padding: 10px;
}
.el-dialog__footer {
height: 60px;
border-top: 1px solid #747373;
text-align: right;
width: 100%;
padding: 0px;
padding-top: 15px;
.el-button + .el-button {
margin-right: 10px;
}
.el-button {
padding-top: 8px;
}
}
}
}
.eldialog-wrap-t {
.el-dialog__header {
border-bottom: 1px solid #747373;
}
.el-dialog__body {
padding: 10px;
}
.el-dialog__footer {
height: 60px;
border-top: 1px solid #747373;
text-align: right;
width: 100%;
padding: 0px;
padding-top: 15px;
.el-button + .el-button {
margin-right: 10px;
}
.el-button {
padding-top: 8px;
}
}
}
</style>