feat: 新增窗口头部组件

This commit is contained in:
DEV_DSW
2025-12-18 14:35:04 +08:00
parent 9bfcc49411
commit 8dec7d676e
17 changed files with 342 additions and 93 deletions

37
global.d.ts vendored
View File

@@ -49,11 +49,12 @@ declare global {
external: {
open: (url: string) => void
},
window: {
minimize: () => void,
maximize: () => void,
close: () => void
},
minimizeWindow: () => void,
maximizeWindow: () => void,
closeWindow: () => void,
onWindowMaximized: (callback: (isMaximized: boolean) => void) => void,
isWindowMaximized: () => Promise<boolean>,
viewIsReady: () => void
app: {
setFrameless: (route?: string) => void
},
@@ -69,10 +70,34 @@ declare global {
on: (event: 'tab-updated' | 'tab-created' | 'tab-closed' | 'tab-switched', handler: (payload: any) => void) => void
},
readFile: (filePath: string) => Promise<{success: boolean, data?: string, error?: string}>,
logToMain: (logLevel: string, message: string) => void,
logger: {
debug: (message: string, ...meta?: any[]) => void;
info: (message: string, ...meta?: any[]) => void;
warn: (message: string, ...meta?: any[]) => void;
error: (message: string, ...meta?: any[]) => void;
},
}
declare interface Window {
api: WindowApi;
}
}
declare module "@store/*";
declare module "@modules/*";
declare module "@utils/*";
declare module "@assets/images/*";
declare module "@constant/*";
declare module "@remixicon/vue";
declare module "vue-router";
declare module '@iconify/vue' {
import { DefineComponent } from 'vue'
export const Icon: DefineComponent<{
icon: string
width?: string | number
height?: string | number
color?: string
flip?: string
rotate?: number
}>
}