提交 729b165d 编写于 作者: B baiy 提交者: ninecents
上级 b028d8de
......@@ -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.
先完成此消息的编辑!
想要评论请 注册