mirror of
https://github.com/electron-vite/electron-vite-vue
synced 2025-09-03 13:07:42 +08:00
chore: upate
This commit is contained in:
@@ -15,11 +15,14 @@ function createWin() {
|
||||
win = new BrowserWindow({
|
||||
width: 1024,
|
||||
height: 768,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
},
|
||||
})
|
||||
|
||||
const URL = is_dev
|
||||
? `http://localhost:${process.env.PORT}` // vite 启动的服务器地址
|
||||
: `file://${join(__dirname, '../render/dist/index.html')}` // vite 构建后的静态文件地址
|
||||
: `file://${join(__dirname, '../../dist/render/index.html')}` // vite 构建后的静态文件地址
|
||||
|
||||
win.loadURL(URL)
|
||||
}
|
||||
|
5
src/main/preload.js
Normal file
5
src/main/preload.js
Normal file
@@ -0,0 +1,5 @@
|
||||
const { ipcRenderer } = require('electron')
|
||||
|
||||
window.stopLoading = function() {
|
||||
ipcRenderer.send('stop-loading-main')
|
||||
}
|
Reference in New Issue
Block a user