zp-dialog.vue
889 Bytes
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
<template>
<el-dialog
:title="title"
class="zp-dialog__wrapper"
v-bind="$attrs"
v-on="$listeners"
>
<template v-slot:title v-if="this.$slots.title">
<slot name="title"></slot>
</template>
<template v-slot:footer>
<slot name="footer"></slot>
</template>
<slot></slot>
</el-dialog>
</template>
<script>
export default {
name: "ZpDialog",
components: {},
props: {
title: {
type: String,
default: "",
},
},
computed: {},
data() {
return {};
},
watch: {},
created() {},
mounted() {},
beforeDestroy() {},
methods: {},
};
</script>
<style lang="less" scoped>
.zp-dialog__wrapper {
/deep/ .el-dialog {
.el-dialog__body {
box-sizing: border-box;
max-height: calc(~"85vh - 112px");
overflow-y: auto;
}
}
}
</style>