/// import type { IeTool } from './utils/uni-tool'; // 扩展全局 UniApp.Uni 接口 declare global { interface Uni { $ie: IeTool; $uv: any; $zp: any; } /** * 微信小程序 API 接口 */ interface Wx { /** * 打开浏览器 * @param options - 配置选项 * @param options.url - 要打开的网址 * @param options.success - 成功回调 * @param options.fail - 失败回调 */ openBrowser?: (options: { url: string; success?: () => void; fail?: (err: any) => void; }) => void; } /** * 支付宝小程序 API 接口 */ interface My { /** * 打开浏览器 * @param options - 配置选项 * @param options.url - 要打开的网址 */ openBrowser?: (options: { url: string }) => void; } /** * 微信小程序全局对象 * 仅在微信小程序环境中可用 * 使用条件编译指令 #ifdef MP-WEIXIN 确保只在微信小程序环境中使用 */ var wx: Wx; /** * 支付宝小程序全局对象 * 仅在支付宝小程序环境中可用 * 使用条件编译指令 #ifdef MP-ALIPAY 确保只在支付宝小程序环境中使用 */ var my: My; } declare module 'pinia' { export interface DefineStoreOptionsBase { // 声明 persist 配置项 persist?: { enabled?: boolean storage?: { getItem: (key: string) => T; setItem: (key: string, value: any) => void; } paths?: string[], omit?: string[] } } } declare module "*.vue" { import type { DefineComponent } from "vue"; const vueComponent: DefineComponent<{}, {}, any>; export default vueComponent; }