Browse Source

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

pull/668/head
无木 5 years ago
parent
commit
ba2bebb406
  1. 4
      src/components/CodeEditor/src/codemirror/CodeMirror.vue

4
src/components/CodeEditor/src/codemirror/CodeMirror.vue

@ -53,7 +53,9 @@
async (v) => {
await nextTick();
const oldValue = editor?.getValue();
v && v !== oldValue && editor?.setValue(v);
if (v !== oldValue) {
editor?.setValue(v ? v : '');
}
},
{ flush: 'post' }
);

Loading…
Cancel
Save