1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
| <template>
| <el-dialog
| :title="title"
| top="10vh"
| center
| :visible.sync="visible"
| :width="width"
| :destroy-on-close="true"
| @close="close()"
| >
| <div>
| <slot
| class="body"
| name="body"
| >
| 我是默认body
| </slot>
| </div>
| <div
| slot="footer"
| class="dialog-footer"
| >
| <el-button
| v-if="isShowCloseBut"
| @click="close()"
| >
| 关闭
| </el-button>
| <el-button
| v-if="isShowSumbitBut"
| type="primary"
| @click="close()"
| >
| 确 定
| </el-button>
| </div>
| </el-dialog>
| </template>
|
| <script>
| export default {
| components: {},
| props: {
| width: {
| type: String,
| default: '30%'
| },
| title: {
| type: String,
| default: 'title'
| },
| isShowCloseBut: {
| type: Boolean,
| default: true
| },
| isShowSumbitBut: {
| type: Boolean,
| default: true
| },
| dialogVisible: {
| type: Boolean,
| default: false
| }
| },
| data () {
| return {
| visible: false
| }
| },
| computed: {},
| watch: {},
| created () {
| console.log('this.dialogVisible', this.dialogVisible)
| this.visible = this.dialogVisible
| },
| mounted () {
|
| },
| methods: {
| close () {
| this.visible = false
| this.$emit('update:dialogVisible', false)
| },
| handleClose () {
|
| }
| }
| }
| </script>
| <style scoped lang="scss">
| </style>
|
|