问题描述
首先,创建diffEditor
this.diffEditor = monaco.editor.createDiffEditor(dom,options);
秒,获取originalEditor
this.originalEditor = this.diffEditor.originalEditor;
第三,将ViewZone添加到originalEditor
this.originalEditor.changeViewZones((changeAccessor) => {
const domNode = doucument.createElement('div');
changeAccessor.addZone({afterLineNumber: 1,domNode})
})
在Chrom中,当编辑器并排使用时可以使用 enter image description here
但是,当我切换到inline-diff时,它不能工作 enter image description here
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)