Browse Source

修改codeMirror的updateValue事件

main
likunming 6 months ago
parent
commit
0069e0661f
  1. 2
      io.sc.platform.core.frontend/src/platform/components/code-mirror/WCodeMirror.vue

2
io.sc.platform.core.frontend/src/platform/components/code-mirror/WCodeMirror.vue

@ -12,7 +12,6 @@
:rules="FieldMethods.getRules(props, modelValue, fieldRef, undefined)" :rules="FieldMethods.getRules(props, modelValue, fieldRef, undefined)"
:readonly="FieldMethods.getReadOnly(props, modelValue)" :readonly="FieldMethods.getReadOnly(props, modelValue)"
:disable="FieldMethods.getDisable(props, modelValue)" :disable="FieldMethods.getDisable(props, modelValue)"
@update:model-value="fieldMethodsClass.updateValue"
@focus.stop.prevent="focus" @focus.stop.prevent="focus"
@blur.stop.prevent="blur" @blur.stop.prevent="blur"
> >
@ -271,6 +270,7 @@ onMounted(() => {
content = content.replace(/[\r\n]/g, ''); content = content.replace(/[\r\n]/g, '');
} }
editorView.dispatch({ changes: { from: 0, to: editorView.state.doc.length, insert: content } }); editorView.dispatch({ changes: { from: 0, to: editorView.state.doc.length, insert: content } });
fieldMethodsClass.updateValue(content);
} }
}, },
); );

Loading…
Cancel
Save