From 9a66c38e01d7ad7dfd4d4460607b751aa06ea47b Mon Sep 17 00:00:00 2001 From: kuaifan Date: Fri, 25 Feb 2022 00:05:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E7=BC=96=E8=BE=91office=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/electron.js | 4 +--- resources/assets/js/pages/manage/file.vue | 5 ++++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/electron/electron.js b/electron/electron.js index 26f83b11..f7e64c13 100644 --- a/electron/electron.js +++ b/electron/electron.js @@ -72,7 +72,6 @@ function createMainWindow() { preload: path.join(__dirname, 'electron-preload.js'), webSecurity: true, nodeIntegration: true, - nodeIntegrationInSubFrames: true, contextIsolation: true, nativeWindowOpen: true } @@ -145,12 +144,11 @@ function createSubWindow(args) { preload: path.join(__dirname, 'electron-preload.js'), webSecurity: true, nodeIntegration: true, - nodeIntegrationInSubFrames: true, contextIsolation: true, nativeWindowOpen: true }, webPreferences), }, config)) - + browser.on('page-title-updated', (event, title) => { if (title == "index.html" || config.titleFixed === true) { event.preventDefault() diff --git a/resources/assets/js/pages/manage/file.vue b/resources/assets/js/pages/manage/file.vue index 4e6af675..5a9b678c 100644 --- a/resources/assets/js/pages/manage/file.vue +++ b/resources/assets/js/pages/manage/file.vue @@ -865,7 +865,10 @@ export default { parent: null, width: Math.min(window.screen.availWidth, 1440), height: Math.min(window.screen.availHeight, 900), - } + }, + webPreferences: { + nodeIntegrationInSubFrames: item.type === 'drawio' + }, }); },