fix 81441

This commit is contained in:
赵霄
2024-01-29 16:33:02 +08:00
parent 9ca8b8a79e
commit 8afbce134a
+15 -6
View File
@@ -24,18 +24,18 @@
import { historyList } from '../api/fileApi'
import { Base64 } from 'js-base64'
let docEditor
const { location } = window
export default {
name: 'editor',
data () {
return {
docEditor: {},
docEditor: null,
documentUrl: window._CONFIG.documentUrl,
callbackUrl: window._CONFIG.callbackUrl,
isFileDisplay: false,
fileList: []
fileList: [],
reloadEditor: true
}
},
mounted () {
@@ -231,7 +231,7 @@ export default {
comments: true, // 定义是显示还是隐藏“注释”菜单按钮;请注意,如果您隐藏“评论”按钮,则相应的评论功能将仅可用于查看,评论的添加和编辑将不可用。默认值为true。
feedback: true, // 反馈配置信息
forcesave: true, // 定义保存按钮是否显示默认false
atuosave: false,
autosave: false,
'features': {
'spellcheck': {
'mode': false,
@@ -267,7 +267,8 @@ export default {
'onDocumentSaved': this.onDocumentSaved
}
})
this.fixSize()
console.log(this.docEditor)
// this.fixSize()
},
/**
* 还原,打开历史记录弹框
@@ -303,8 +304,16 @@ export default {
* 确定回滚到某个版本
*/
fileContentClick (file) {
console.log('回归')
this.docEditor.destroyEditor()
// 第一次进入在线编辑上面的方法可能会无效,使用下面的方法强行删除dom元素
const parentDom = document.getElementById('placeholder')
const iframe = parentDom.children.namedItem('frameEditor')
if (iframe) {
const divDom = document.createElement('div')
divDom.setAttribute('id', 'iframeEditor')
iframe.remove()
parentDom.appendChild(divDom)
}
this.connectEditor(file)
this.isFileDisplay = false
}