Commit ba2bebb4069085817a90d065ed5877fdb50a8039

Authored by 无木
1 parent 7e2ca79e

fix(codeeditor): empty value set failed.fixed:#659

src/components/CodeEditor/src/codemirror/CodeMirror.vue
... ... @@ -53,7 +53,9 @@
53 53 async (v) => {
54 54 await nextTick();
55 55 const oldValue = editor?.getValue();
56   - v && v !== oldValue && editor?.setValue(v);
  56 + if (v !== oldValue) {
  57 + editor?.setValue(v ? v : '');
  58 + }
57 59 },
58 60 { flush: 'post' }
59 61 );
... ...