feat: 语法错误修复
This commit is contained in:
@@ -5,8 +5,8 @@ function cleanDirectory(dirPath) {
|
|||||||
const resolvedPath = path.resolve(dirPath)
|
const resolvedPath = path.resolve(dirPath)
|
||||||
|
|
||||||
const parentDir = path.basename(path.dirname(resolvedPath))
|
const parentDir = path.basename(path.dirname(resolvedPath))
|
||||||
if (parentDir !== 'packages') {
|
if (parentDir !== 'out') {
|
||||||
console.error(`Error: Directory "${resolvedPath}" is not inside a "packages" folder`)
|
console.error(`Error: Directory "${resolvedPath}" is not inside a "out" folder`)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
1773
package-lock.json
generated
1773
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,8 @@
|
|||||||
"publish": "electron-forge publish",
|
"publish": "electron-forge publish",
|
||||||
"lint": "eslint --ext .ts,.tsx .",
|
"lint": "eslint --ext .ts,.tsx .",
|
||||||
"generate-prod-entry": "node build/scripts/generateProdEntry.js",
|
"generate-prod-entry": "node build/scripts/generateProdEntry.js",
|
||||||
"build:encrypt": "npm run clean && npm run lint && npm run package && npm run generate-prod-entry"
|
"clean": "node build/scripts/clean.js",
|
||||||
|
"build:encrypt": "npm run clean && npm run package && npm run generate-prod-entry"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": {
|
"author": {
|
||||||
@@ -20,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@electron-forge/cli": "^7.10.2",
|
"@electron-forge/cli": "^7.8.3",
|
||||||
"@electron-forge/maker-deb": "^7.10.2",
|
"@electron-forge/maker-deb": "^7.10.2",
|
||||||
"@electron-forge/maker-rpm": "^7.10.2",
|
"@electron-forge/maker-rpm": "^7.10.2",
|
||||||
"@electron-forge/maker-squirrel": "^7.10.2",
|
"@electron-forge/maker-squirrel": "^7.10.2",
|
||||||
@@ -40,10 +41,12 @@
|
|||||||
"electron": "38.2.2",
|
"electron": "38.2.2",
|
||||||
"eslint": "^8.57.1",
|
"eslint": "^8.57.1",
|
||||||
"eslint-plugin-import": "^2.32.0",
|
"eslint-plugin-import": "^2.32.0",
|
||||||
|
"eslint-plugin-vue": "^10.6.0",
|
||||||
"postcss": "^8.5.6",
|
"postcss": "^8.5.6",
|
||||||
"tailwindcss": "^3.4.18",
|
"tailwindcss": "^3.4.18",
|
||||||
"typescript": "~4.5.4",
|
"typescript": "~4.5.4",
|
||||||
"vite": "^7.1.9"
|
"vite": "^7.1.9",
|
||||||
|
"vue-eslint-parser": "^10.2.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.12.2",
|
"axios": "^1.12.2",
|
||||||
|
|||||||
@@ -46,13 +46,13 @@ export class IPCManager {
|
|||||||
return await handler(...args)
|
return await handler(...args)
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Error(`No async handler for channel: ${channel}`)
|
// throw new Error(`No async handler for channel: ${channel}`)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw error
|
// throw error
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
ipcMain.handle('get-window-id',(event) => {
|
ipcMain.handle('get-window-id',(event: any) => {
|
||||||
event.returnValue = event.sender.id
|
event.returnValue = event.sender.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -71,17 +71,17 @@ export class IPCManager {
|
|||||||
public broadcast(channel:string, ...args:any[]):void {
|
public broadcast(channel:string, ...args:any[]):void {
|
||||||
BaseWindow.getAllWindows().forEach(window => {
|
BaseWindow.getAllWindows().forEach(window => {
|
||||||
if (!window.isDestroyed()) {
|
if (!window.isDestroyed()) {
|
||||||
window.webContents.send(channel, ...args)
|
(window as any).webContents.send(channel, ...args)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 发送消息给指定窗口
|
// 发送消息给指定窗口
|
||||||
public sendToWindow(windowId: string, channel:string, ...args:any[]):void {
|
public sendToWindow(windowId: number, channel:string, ...args:any[]):void {
|
||||||
const window = BaseWindow.fromId(windowId)
|
const window = BaseWindow.fromId(windowId)
|
||||||
|
|
||||||
if (window && !window.isDestroyed()) {
|
if (window && !window.isDestroyed()) {
|
||||||
window.webContents.send(channel, ...args)
|
(window as any).webContents.send(channel, ...args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ instance.interceptors.request.use(
|
|||||||
(config) => {
|
(config) => {
|
||||||
const token = localStorage.getItem('token')
|
const token = localStorage.getItem('token')
|
||||||
if (token) {
|
if (token) {
|
||||||
config.headers = { ...(config.headers || {}), Authorization: `Bearer ${token}` }
|
(config as any).headers = { ...(config.headers || {}), Authorization: `Bearer ${token}` }
|
||||||
}
|
}
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user