diff --git a/resources/assets/js/components/OnlyOffice.vue b/resources/assets/js/components/OnlyOffice.vue index 9c3b0cae..189d5f2d 100644 --- a/resources/assets/js/components/OnlyOffice.vue +++ b/resources/assets/js/components/OnlyOffice.vue @@ -165,6 +165,9 @@ export default { "callbackUrl": 'http://nginx/api/file/content/office?id=' + fileKey + '&token=' + this.userToken, } }; + if (/\/hideenOfficeTitle\//.test(window.navigator.userAgent)) { + config.document.title = " "; + } if ($A.leftExists(fileKey, "msgFile_")) { config.document.url = 'http://nginx/api/dialog/msg/download/?msg_id=' + $A.leftDelete(fileKey, "msgFile_") + '&token=' + this.userToken; } else if ($A.leftExists(fileKey, "taskFile_")) { diff --git a/resources/assets/js/pages/manage/file.vue b/resources/assets/js/pages/manage/file.vue index 2da978b3..810e9def 100644 --- a/resources/assets/js/pages/manage/file.vue +++ b/resources/assets/js/pages/manage/file.vue @@ -799,8 +799,9 @@ export default { openSingle(item) { this.$Electron.ipcRenderer.send('windowRouter', { - title: item.name, + title: this.formatName(item), titleFixed: true, + userAgent: "/hideenOfficeTitle/", name: 'file-' + item.id, path: "/single/file/" + item.id, force: false, // 如果窗口已存在不重新加载