fix 81441
This commit is contained in:
@@ -24,18 +24,18 @@
|
|||||||
import { historyList } from '../api/fileApi'
|
import { historyList } from '../api/fileApi'
|
||||||
import { Base64 } from 'js-base64'
|
import { Base64 } from 'js-base64'
|
||||||
|
|
||||||
let docEditor
|
|
||||||
const { location } = window
|
const { location } = window
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'editor',
|
name: 'editor',
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
docEditor: {},
|
docEditor: null,
|
||||||
documentUrl: window._CONFIG.documentUrl,
|
documentUrl: window._CONFIG.documentUrl,
|
||||||
callbackUrl: window._CONFIG.callbackUrl,
|
callbackUrl: window._CONFIG.callbackUrl,
|
||||||
isFileDisplay: false,
|
isFileDisplay: false,
|
||||||
fileList: []
|
fileList: [],
|
||||||
|
reloadEditor: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
@@ -231,7 +231,7 @@ export default {
|
|||||||
comments: true, // 定义是显示还是隐藏“注释”菜单按钮;请注意,如果您隐藏“评论”按钮,则相应的评论功能将仅可用于查看,评论的添加和编辑将不可用。默认值为true。
|
comments: true, // 定义是显示还是隐藏“注释”菜单按钮;请注意,如果您隐藏“评论”按钮,则相应的评论功能将仅可用于查看,评论的添加和编辑将不可用。默认值为true。
|
||||||
feedback: true, // 反馈配置信息
|
feedback: true, // 反馈配置信息
|
||||||
forcesave: true, // 定义保存按钮是否显示默认false
|
forcesave: true, // 定义保存按钮是否显示默认false
|
||||||
atuosave: false,
|
autosave: false,
|
||||||
'features': {
|
'features': {
|
||||||
'spellcheck': {
|
'spellcheck': {
|
||||||
'mode': false,
|
'mode': false,
|
||||||
@@ -267,7 +267,8 @@ export default {
|
|||||||
'onDocumentSaved': this.onDocumentSaved
|
'onDocumentSaved': this.onDocumentSaved
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.fixSize()
|
console.log(this.docEditor)
|
||||||
|
// this.fixSize()
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 还原,打开历史记录弹框
|
* 还原,打开历史记录弹框
|
||||||
@@ -303,8 +304,16 @@ export default {
|
|||||||
* 确定回滚到某个版本
|
* 确定回滚到某个版本
|
||||||
*/
|
*/
|
||||||
fileContentClick (file) {
|
fileContentClick (file) {
|
||||||
console.log('回归')
|
|
||||||
this.docEditor.destroyEditor()
|
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.connectEditor(file)
|
||||||
this.isFileDisplay = false
|
this.isFileDisplay = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user