fix: 客户端无法编辑office文件

This commit is contained in:
kuaifan 2022-02-25 00:05:35 +08:00
parent 81132ecab0
commit 9a66c38e01
2 changed files with 5 additions and 4 deletions

View File

@ -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()

View File

@ -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'
},
});
},