md/src/components/CodemirrorEditor/resetDialog.vue

50 lines
1.1 KiB
Vue
Raw Normal View History

2020-05-17 22:19:45 +08:00
<template>
<el-dialog title="提示" class="reset__dialog" :visible="showResetConfirm" @close="$emit('close')">
<div class="text">
此操作将丢失本地缓存的文本和自定义样式是否继续?
</div>
<div slot="footer" class="dialog-footer">
<el-button :type="btnType" plain @click="$emit('close')"> </el-button>
<el-button :type="btnType" @click="$emit('confirm')" plain> </el-button>
</div>
</el-dialog>
</template>
<script>
2020-10-13 00:07:14 +08:00
import {
mapState
} from 'vuex';
export default {
props: {
showResetConfirm: {
type: Boolean,
default: false
}
2020-05-17 22:19:45 +08:00
},
2020-10-13 00:07:14 +08:00
computed: {
btnType() {
return this.nightMode ? 'default' : 'primary';
},
...mapState({
nightMode: state => state.nightMode
})
}
2020-05-17 22:19:45 +08:00
}
2020-10-13 00:07:14 +08:00
2020-05-17 22:19:45 +08:00
</script>
<style lang="less" scoped>
2020-10-13 00:07:14 +08:00
.reset__dialog {
text-align: center;
}
.text {
text-align: center;
}
.dialog-footer {
text-align: center;
}
</style>