Browse Source

Merge pull request #824 from colinin/code-mirror-refesh-style-when-value-changed

fix(code-mirror): refresh the style when the value changes
pull/830/head
yx lin 3 years ago
committed by GitHub
parent
commit
ab6cce5e8a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      apps/vue/src/components/CodeEditor/src/codemirror/CodeMirror.vue

1
apps/vue/src/components/CodeEditor/src/codemirror/CodeMirror.vue

@ -46,6 +46,7 @@
const oldValue = editor?.getValue();
if (value !== oldValue) {
editor?.setValue(value ? value : '');
setTimeout(refresh, 50);
}
},
{ flush: 'post' },

Loading…
Cancel
Save