This commit is contained in:
2024-07-15 10:30:50 +08:00
parent 7595573c0d
commit 6a34996f18
2 changed files with 10 additions and 11 deletions

View File

@ -553,7 +553,8 @@ export default {
bottomclickevent(uitem, index, uindex) { bottomclickevent(uitem, index, uindex) {
if ( if (
this.form.taskNodeType != "QUESTIONNAIRE_SCALE" && this.form.taskNodeType != "QUESTIONNAIRE_SCALE" &&
this.form.taskNodeType != "PROPAGANDA_ARTICLE" this.form.taskNodeType != "PROPAGANDA_ARTICLE" &&
this.form.taskNodeType != "PHONE_OUTBOUND"
) { ) {
this.$refs.wangeditor.emit(); this.$refs.wangeditor.emit();
} }

View File

@ -2,7 +2,7 @@
<div style="border: 1px solid #ccc;"> <div style="border: 1px solid #ccc;">
<Toolbar style="border-bottom: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" :mode="mode" /> <Toolbar style="border-bottom: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" :mode="mode" />
<Editor style="height: 500px; overflow-y: hidden;" v-model="html" :defaultConfig="editorConfig" :mode="mode" <Editor style="height: 500px; overflow-y: hidden;" v-model="html" :defaultConfig="editorConfig" :mode="mode"
disabled @onChange="onChange" @onCreated="onCreated" @onFocus="handleFocus" /> @onChange="onChange" @onCreated="onCreated" @onFocus="handleFocus" />
<el-dialog title="添加画像标签字段" :visible.sync="labelshow" width="40%" :before-close="beforeClose"> <el-dialog title="添加画像标签字段" :visible.sync="labelshow" width="40%" :before-close="beforeClose">
<el-cascader-panel :options="labeloptions" @change="panelchange" v-if="labelshow" <el-cascader-panel :options="labeloptions" @change="panelchange" v-if="labelshow"
:props="{ value: 'labelFieldId', label: 'fieldName', children: 'labelFieldContentList' }"></el-cascader-panel> :props="{ value: 'labelFieldId', label: 'fieldName', children: 'labelFieldContentList' }"></el-cascader-panel>
@ -96,9 +96,6 @@ export default ({
} }
}, },
methods: { methods: {
disable() {
this.editor.disable()
},
emit() { emit() {
this.$emit("on-nodeContent", { nodeContent: this.html }); this.$emit("on-nodeContent", { nodeContent: this.html });
}, },
@ -181,6 +178,7 @@ export default ({
}, },
onCreated(editor) { onCreated(editor) {
this.editor = Object.seal(editor); this.editor = Object.seal(editor);
this.editor.disable()
}, },
onChange(editor) { onChange(editor) {
// console.log("onChange", editor.getHtml()); // onChange // console.log("onChange", editor.getHtml()); // onChange
@ -229,7 +227,7 @@ class MyButtonMenu3 { // JS 语法
} }
// H1 false // H1 false
isDisabled(editor) { isDisabled(editor) {
return false; return true;
} }
// //
exec(editor, value) { exec(editor, value) {
@ -254,7 +252,7 @@ class MyButtonMenu4 { // JS 语法
} }
// H1 false // H1 false
isDisabled(editor) { isDisabled(editor) {
return false; return true;
} }
// //
exec(editor, value) { exec(editor, value) {
@ -365,7 +363,7 @@ function renderAttachment(elem, children, editor) {
on: { click() { } /* 其他... */ }, on: { click() { } /* 其他... */ },
}, },
// img // img
[fileSpan, iconVnode] [fileSpan]
); );
const nameVnode = h( const nameVnode = h(
// HTML tag // HTML tag
@ -382,7 +380,7 @@ function renderAttachment(elem, children, editor) {
on: { click() { } /* 其他... */ }, on: { click() { } /* 其他... */ },
}, },
// img // img
[fileName, nameiconVnode] [fileName]
); );
// vnode // vnode
const attachVnode = h( const attachVnode = h(
@ -470,7 +468,7 @@ function renderAttachmenttwo(elem, children, editor) {
on: { click() { } /* 其他... */ }, on: { click() { } /* 其他... */ },
}, },
// img // img
[fileSpan, iconVnode] [fileSpan]
); );
const nameVnode = h( const nameVnode = h(
// HTML tag // HTML tag
@ -486,7 +484,7 @@ function renderAttachmenttwo(elem, children, editor) {
on: { click() { } /* 其他... */ }, on: { click() { } /* 其他... */ },
}, },
// img // img
[fileName, nameiconVnode] [fileName]
); );
// vnode // vnode
const attachVnode = h( const attachVnode = h(