feat: 构建后注册事件丢失
This commit is contained in:
parent
e5e96891ef
commit
fc26f12051
|
@ -65,14 +65,13 @@ function createWindow() {
|
|||
win.loadURL(VITE_DEV_SERVER_URL);
|
||||
} else {
|
||||
win.loadFile(path.join(RENDERER_DIST, "index.html")).then(() => {
|
||||
win?.webContents.openDevTools();
|
||||
// 检查是否传递了路径
|
||||
if (process.argv.length >= 2) {
|
||||
const folderPath = process.argv[1]; // 这是选中的目录路径
|
||||
console.log("Opened directory path:", folderPath);
|
||||
win?.webContents.send("open-folder", process.argv);
|
||||
const folderPath = process.argv[2];
|
||||
win?.webContents.send("open-folder", folderPath);
|
||||
registerIpcMainHandlers(win);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// pythonManager = new PythonManager(win, "http://127.0.0.1:15001", 3000);
|
||||
|
|
Loading…
Reference in New Issue
Block a user