From e372854c71bc97d162452cc4b3f5cfa586da50a8 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期四, 22 五月 2025 17:06:31 +0800 Subject: [PATCH] feat: UI --- apps/h5/types/global.d.ts | 154 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 154 insertions(+), 0 deletions(-) diff --git a/apps/h5/types/global.d.ts b/apps/h5/types/global.d.ts new file mode 100644 index 0000000..33ce661 --- /dev/null +++ b/apps/h5/types/global.d.ts @@ -0,0 +1,154 @@ +import { ElTree } from 'element-plus'; +import { Ref,PropType as VPropType,Ref } from 'vue'; +import { + OperationBtnType as BlOperationBtnType, +} from '@bole-core/components'; + + +declare global { + const __APP_INFO__: { + pkg: { + name: string; + version: string; + dependencies: Recordable<string>; + devDependencies: Recordable<string>; + }; + lastBuildTime: string; + }; + interface Window { + webkitCancelAnimationFrame: (handle: number) => void; + mozCancelAnimationFrame: (handle: number) => void; + oCancelAnimationFrame: (handle: number) => void; + msCancelAnimationFrame: (handle: number) => void; + webkitRequestAnimationFrame: (callback: FrameRequestCallback) => number; + mozRequestAnimationFrame: (callback: FrameRequestCallback) => number; + oRequestAnimationFrame: (callback: FrameRequestCallback) => number; + msRequestAnimationFrame: (callback: FrameRequestCallback) => number; + WeixinJSBridge:any + } + + type TreeInstanceType = InstanceType<typeof ElTree>; + type OperationBtnType = BlOperationBtnType; + type PropType<T> = VPropType<T>; + type MaybeRef<T> = T | Ref<T>; + + type Writable<T> = { + -readonly [P in keyof T]: T[P]; + }; + + type Nullable<T> = T | null; + type Recordable<T = any> = Record<string, T>; + type ReadonlyRecordable<T = any> = { + readonly [key: string]: T; + }; + type Indexable<T = any> = { + [key: string]: T; + }; + type DeepPartial<T> = { + [P in keyof T]?: DeepPartial<T[P]>; + }; + type ValueOf<T> = T[keyof T]; + type TimeoutHandle = ReturnType<typeof setTimeout>; + type IntervalHandle = ReturnType<typeof setInterval>; + + interface ChangeEvent extends Event { + target: HTMLInputElement; + } + + interface WheelEvent { + path?: EventTarget[]; + } + interface ImportMetaEnv extends ViteEnv { + __: unknown; + } + + /** + * 鎵撳寘鍘嬬缉鏍煎紡鐨勭被鍨嬪0鏄� + */ + type ViteCompression = + | "none" + | "gzip" + | "brotli" + | "both" + | "gzip-clear" + | "brotli-clear" + | "both-clear"; + + interface ViteEnv { + /** + * 椤圭洰鏈湴杩愯绔彛鍙� + */ + VITE_PORT: number; + /** + * 寮�鍙戠幆澧冭鍙栭厤缃枃浠惰矾寰� + */ + VITE_PUBLIC_PATH: string; + /** + * 寮�鍙戠幆澧冧唬鐞� + */ + VITE_PROXY_DOMAIN: string; + /** + * 寮�鍙戠幆澧冨悗绔湴鍧� + */ + VITE_PROXY_DOMAIN_REAL: string; + /** + * 寮�鍙戠幆澧冭矾鐢卞巻鍙叉ā寮� + */ + VITE_ROUTER_HISTORY: string; + /** + * 鏄惁涓烘墦鍖呭悗鐨勬枃浠舵彁渚涗紶缁熸祻瑙堝櫒鍏煎鎬ф敮鎸� 鏀寔 true 涓嶆敮鎸� false + */ + VITE_LEGACY: boolean; + /** + * OSS涓婁紶鍦板潃 + */ + VITE_OSS_URL: string; + VITE_OSS_URL_BUCKET: string; + /** + * api鍩虹鍦板潃 + */ + VITE_BASE_URL: string; + + VITE_COMPRESSION: ViteCompression; + VITE_WEMAP_KEY:string; + VITE_CLIENT_ORIGIN:string; + VITE_AppType: 'one' | 'jx'; + } + + interface AppConfig { + + title: string; + + /** + * @description 鐧诲綍椤礷orm title + */ + loginFormTitle: string; + + /** + * @type {string | array} 'production' | ['production', 'development'] + * @description Need show err logs component. + */ + errorLog: string | Array<'production' | 'development'>; + } + + interface WeMapModel { + latitude?: number; + longitude?: number; + provinceName?: string; + cityName?: string; + countyName?: string; + provinceCode?: number; + cityCode?: number; + countyCode?: number; + address?: string; + } + + interface CommonAnnexItem { + url?: string; + name?: string; + path?: string; + }; + +} + +export { } -- Gitblit v1.9.1