新的提交

This commit is contained in:
cc
2026-01-10 13:01:37 +08:00
commit 01641834de
188 changed files with 34865 additions and 0 deletions

23
src/services/ipc.ts Normal file
View File

@@ -0,0 +1,23 @@
// Electron IPC 通信封装
// 配置
export const config = {
get: (key: string) => window.electronAPI.config.get(key),
set: (key: string, value: unknown) => window.electronAPI.config.set(key, value),
clear: () => window.electronAPI.config.clear()
}
// 对话框
export const dialog = {
openFile: (options?: Electron.OpenDialogOptions) =>
window.electronAPI.dialog.openFile(options),
saveFile: (options?: Electron.SaveDialogOptions) =>
window.electronAPI.dialog.saveFile(options)
}
// 窗口控制
export const windowControl = {
minimize: () => window.electronAPI.window.minimize(),
maximize: () => window.electronAPI.window.maximize(),
close: () => window.electronAPI.window.close()
}