提交 5927807b 编写于 作者: B baiy 提交者: ninecents
上级 30c90b46
......@@ -58,7 +58,17 @@ export default {
watch: {
value(newValue) {
if (this.editor !== null && this.editor.getValue() !== newValue) {
this.editor.setValue(newValue)
this.editor.pushUndoStop();
this.editor.getModel().pushEditOperations(
[],
[
{
range: this.editor.getModel().getFullModelRange(),
text: newValue,
},
]
);
this.editor.pushUndoStop();
}
},
language(newValue) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册