diff --git a/build/vite/plugin/index.ts b/build/vite/plugin/index.ts index 58065a5..d3552ce 100644 --- a/build/vite/plugin/index.ts +++ b/build/vite/plugin/index.ts @@ -2,7 +2,7 @@ * @Author: Fuyuu 1805498209@qq.com * @Date: 2023-11-30 10:37:07 * @LastEditors: Fuyuu 1805498209@qq.com - * @LastEditTime: 2024-01-20 10:31:38 + * @LastEditTime: 2024-01-24 15:16:36 * @FilePath: \dt-admin-pc-v2\build\vite\plugin\index.ts * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ diff --git a/electron/electron.js b/electron/electron.js index 4c439e7..1aacbc3 100644 --- a/electron/electron.js +++ b/electron/electron.js @@ -105,12 +105,15 @@ function createWindow() { width: 800, height: 600, webPreferences: { - preload: path.join(__dirname, 'preload.js'), + // preload: path.join(__dirname, 'preload.js'), javascript: true, plugins: true, + allowRunningInsecureContent: true, // 允许web端使用node nodeIntegration: true, contextIsolation: false, + // 同源策略关闭 + webSecurity: false, }, }); @@ -147,18 +150,18 @@ app.on('window-all-closed', () => { } }); -// 在主进程中监听 webContents 的 did-create-window 事件 -app.on('web-contents-created', (event, webContents) => { - // 监听新窗口创建事件 - webContents.on('did-create-window', (Window, details) => { - console.log('Window---', Window); - // 在新窗口创建完成后重新加载预加载脚本 - Window.webContents.on('dom-ready', () => { - Window.webContents.executeJavaScript( - ` - console.log('window----',window) - ` - ); - }); - }); -}); +// // 在主进程中监听 webContents 的 did-create-window 事件 +// app.on('web-contents-created', (event, webContents) => { +// // 监听新窗口创建事件 +// webContents.on('did-create-window', (Window, details) => { +// console.log('Window---', Window); +// // 在新窗口创建完成后重新加载预加载脚本 +// Window.webContents.on('dom-ready', () => { +// Window.webContents.executeJavaScript( +// ` +// console.log('window----',window) +// ` +// ); +// }); +// }); +// }); diff --git a/index.html b/index.html index c7d7b73..fc814aa 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ - + <%= title %> diff --git a/src/components/earthMap/AISInfoWindow.vue b/src/components/earthMap/AISInfoWindow.vue index 67edf32..7edca67 100644 --- a/src/components/earthMap/AISInfoWindow.vue +++ b/src/components/earthMap/AISInfoWindow.vue @@ -2,12 +2,12 @@ * @Author: Fuyuu 1805498209@qq.com * @Date: 2024-01-05 14:18:33 * @LastEditors: Fuyuu 1805498209@qq.com - * @LastEditTime: 2024-01-20 14:57:59 + * @LastEditTime: 2024-01-24 11:20:17 * @FilePath: \dt-admin-pc-v2\src\components\earthMap\AISInfoWindow.vue * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE -->