From f61d79d53e93852e8cf8baa8e18e733b6662636b Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 27 Jan 2022 23:28:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AFoffice=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E4=BF=AE=E6=94=B9=E7=AA=97=E5=8F=A3=E9=9A=90=E8=97=8F?= =?UTF-8?q?=E8=87=AA=E5=B8=A6=E7=9A=84=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/js/components/OnlyOffice.vue | 3 +++ resources/assets/js/pages/manage/file.vue | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) 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, // 如果窗口已存在不重新加载