1549469775 4 years ago
parent
commit
e1f845d349
  1. 4
      src/main/index.ts
  2. 2
      src/main/menu.ts

4
src/main/index.ts

@ -45,8 +45,8 @@ function createWin() {
const URL = app.isPackaged
? `file://${__dirname}/index.html` // vite 构建后的静态文件地址
// : `http://localhost:${process.env.PORT}/#/` // vite 启动的服务器地址
: `http://localhost:8080/#/` // vite 启动的服务器地址
: `http://localhost:${process.env.PORT}/#/` // vite 启动的服务器地址
// : `http://localhost:8080/#/` // vite 启动的服务器地址
Shared.data.mainWindow?.loadURL(URL)
}

2
src/main/menu.ts

@ -31,7 +31,7 @@ let template = [
},
})
// 隐藏菜单
newwin?.setMenuBarVisibility(false)
newwin.setMenuBarVisibility(false)
newwin.loadURL(process.env.NODE_ENV === "development" ? `http://localhost:${process.env.PORT}/#/about` : `file://${__dirname}/index.html#/about`);
newwin.on("ready-to-show", () => {
newwin?.show()

Loading…
Cancel
Save