<template> <div> <el-dialog center :visible.sync="dialogVisible" width="40%" show-close @closed="cancelSubmit" > <slot name="content"></slot> <slot name="footer"></slot> </el-dialog> </div> </template> <script> export default { data() { return { dialogVisible: false, loading: false } }, watch: {}, mounted() {}, methods: { cancelSubmit() { this.dialogVisible = false this.$emit("onCancel") }, // onSubmit() { // this.$emit("onSubmit") // }, }, } </script> <style lang="scss" scoped> ::v-deep .el-dialog__body { border-top: none; text-align: center; } </style>