🐞 fix: 修复歌词界面无法打开问题

This commit is contained in:
alger
2024-05-16 19:57:20 +08:00
parent a9e5bb33e4
commit 50e594b91d
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -1,4 +1,5 @@
const { BrowserWindow } = require('electron');
const path = require('path');
let lyricWindow = null;
@@ -21,7 +22,8 @@ const loadLyricWindow = (ipcMain) => {
lyricWindow.webContents.openDevTools({ mode: 'detach' });
lyricWindow.loadURL('http://localhost:4678/#/lyric');
} else {
lyricWindow.loadURL(`file://${__dirname}/dist/index.html/#/lyric`);
const distPath = path.resolve(__dirname, '../dist');
lyricWindow.loadURL(`file://${distPath}/index.html#/lyric`);
}
lyricWindow.show();
+1
View File
@@ -10,6 +10,7 @@
"serve": "vite preview",
"es": "vite && electron .",
"start": "set NODE_ENV=development&&electron .",
"sp": "electron .",
"e:b": "electron-builder --config ./electron.config.json",
"eb": "vite build && e:b",
"lint": "eslint --ext .vue,.js,.jsx,.ts,.tsx ./ --max-warnings 0"