ui(autoMate): import路径修复(window.ts)🐛, 创建窗口函数调用修复(index.ts)

This commit is contained in:
yuruo
2024-06-06 18:40:54 +08:00
parent 87eac92b3d
commit f4cffb65f8
2 changed files with 3 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
import { BrowserWindow, shell } from 'electron'
import { is } from '@electron-toolkit/utils'
import icon from '../../../resources/icon.png?asset'
import * as ipc from './ipc'
import * as ipc from '../ipc'
import { join } from 'path'
export function createWindow(): void { // Create the browser window.

View File

@@ -1,5 +1,6 @@
import { app, BrowserWindow, ipcMain } from 'electron'
import { electronApp, optimizer } from '@electron-toolkit/utils'
import { createWindow } from './code/window'
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
@@ -21,7 +22,7 @@ app.whenReady().then(() => {
app.on('activate', function () {
// On macOS it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (BrowserWindow.getAllWindows().length === 0) code.createWindow()
if (BrowserWindow.getAllWindows().length === 0) createWindow()
})
})