update 格式化代码

This commit is contained in:
赵霄
2023-09-05 10:58:01 +08:00
parent 27a98d5c60
commit a0d36cc223
+13 -7
View File
@@ -119,6 +119,7 @@ export default {
console.log(12) console.log(12)
}, },
connectEditor () { connectEditor () {
console.log(this.documentUrl)
const nowTime = new Date().getTime() const nowTime = new Date().getTime()
this.docEditor = new DocsAPI.DocEditor('iframeEditor', { this.docEditor = new DocsAPI.DocEditor('iframeEditor', {
width: '100%', width: '100%',
@@ -131,8 +132,10 @@ export default {
documentType: 'text', documentType: 'text',
token: '', token: '',
document: { document: {
title: this.$route.query.oldFileName + '.' + this.$route.query.fileType, // title: this.$route.query.oldFileName + '.' + this.$route.query.fileType,
url: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName, title: '文档.docx',
// url: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName,
url: this.documentUrl,
fileType: this.$route.query.fileType, fileType: this.$route.query.fileType,
key: this.$route.query.key, key: this.$route.query.key,
info: { info: {
@@ -163,9 +166,12 @@ export default {
}, },
// embedded部分仅适用于嵌入式文档类型(请参阅config部分以了解如何定义嵌入式文档类型)。它允许更改设置,这些设置定义嵌入式模式下按钮的行为。 // embedded部分仅适用于嵌入式文档类型(请参阅config部分以了解如何定义嵌入式文档类型)。它允许更改设置,这些设置定义嵌入式模式下按钮的行为。
embedded: { embedded: {
saveUrl: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName, // 定义允许将文档保存到用户个人计算机上的绝对URL。 // saveUrl: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName, // 定义允许将文档保存到用户个人计算机上的绝对URL。
embedUrl: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName, // 定义文档的绝对URL,以作为嵌入到网页中的文档的源文件 // embedUrl: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName, // 定义文档的绝对URL,以作为嵌入到网页中的文档的源文件
shareUrl: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName, // 定义允许其他用户共享此文档的绝对URL。 // shareUrl: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName, // 定义允许其他用户共享此文档的绝对URL。
saveUrl: this.documentUrl, // 定义允许将文档保存到用户个人计算机上的绝对URL。
embedUrl: this.documentUrl, // 定义文档的绝对URL,以作为嵌入到网页中的文档的源文件
shareUrl: this.documentUrl, // 定义允许其他用户共享此文档的绝对URL。
toolbarDocked: 'top' // 定义嵌入式查看器工具栏的位置,可以为top或bottom。 toolbarDocked: 'top' // 定义嵌入式查看器工具栏的位置,可以为top或bottom。
}, },
// 定制部分允许自定义编辑器界面,使其看起来像您的其他产品,并更改是否存在其他按钮,链接,更改徽标和编辑者所有者详细信息。 // 定制部分允许自定义编辑器界面,使其看起来像您的其他产品,并更改是否存在其他按钮,链接,更改徽标和编辑者所有者详细信息。
@@ -191,12 +197,12 @@ export default {
}, },
fileChoiceUrl: '', fileChoiceUrl: '',
// 定义是否将启动插件并可用。默认值为true。 // 定义是否将启动插件并可用。默认值为true。
plugins: this.$route.query.isEdit && this.$route.query.isEdit == 123 ? { plugins: {
autostart: ['asc.{0616AE85-5DBE-4B6B-A0A9-455C4F1503AD}'], autostart: ['asc.{0616AE85-5DBE-4B6B-A0A9-455C4F1503AD}'],
pluginsData: [ pluginsData: [
window._CONFIG.configUrl + 'page1/config.json' window._CONFIG.configUrl + 'page1/config.json'
] ]
} : {} }
}, },
events: { events: {
'onAppReady': this.onAppReady, 'onAppReady': this.onAppReady,