rt-sim-training-client/src/views/competitionManage/bankList/dialog-modify-rich.vue

51 lines
1.3 KiB
Vue
Raw Normal View History

2020-05-26 15:59:11 +08:00
<template>
<el-dialog v-dialogDrag :close-on-click-moda="false" :title="title" :visible.sync="show" width="40%" :close-on-click-modal="false" :before-close="doClose">
<quill-editor v-model="content" placeholder="请输入内容" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doInput"> </el-button>
<el-button @click="show = false"> </el-button>
</span>
</el-dialog>
</template>
<script>
2021-03-03 15:12:21 +08:00
import QuillEditor from '@/components/QuillEditor/index';
2020-05-26 15:59:11 +08:00
export default {
2021-03-03 15:12:21 +08:00
components: {
QuillEditor
},
2020-05-26 15:59:11 +08:00
data() {
return {
show: false,
content: '',
node: {
model: {},
prop: ''
}
};
},
computed: {
title() {
return '富文本输入';
}
},
methods: {
doShow(node) {
this.node = node;
this.content = (node.model || {})[node.prop] || '';
this.show = true;
},
doClose(done) {
this.show = false;
},
doInput() {
const node = this.node;
node.model[node.prop] = this.content;
2020-10-22 09:45:33 +08:00
// this.$emit('update');
2020-05-26 15:59:11 +08:00
this.doClose();
}
}
};
</script>