<!-- CustomDialog.vue -->
<template>
<el-dialog :visible.sync="visible" class="custom-dialog">
<slot name="title"></slot>
<slot></slot>
<slot name="footer"></slot>
</el-dialog>
</template>
<style scoped>
.custom-dialog .el-dialog__header {
background-color: #f2f2f2;
}
.custom-dialog .el-dialog__body {
background-color: #ffffff;
}
.custom-dialog .el-dialog__footer {
background-color: #eaeaea;
}
</style>
将一个对话框的.el-dialog__header ,.el-dialog__footer,.el-dialog__footer设置背景色,并且不影响其他对话框的.el-dialog__header
最新推荐文章于 2024-01-20 17:51:14 发布