Files
blog/env.d.ts
2026-08-04 17:33:45 +08:00

30 lines
894 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/// <reference types="vite/client" />
/// <reference types="axios" />
/// <reference types="vue-router/auto" />
// 全局变量:由 src/config/index.ts 的 useConfig() 与 src/Index.vue 注册,
// 使用时不需 import均挂载在 window 上)
declare global {
// API 聚合对象:$http.<模块>.<函数>(),模块见 src/api/*/index.ts
let $http: any;
// vue3-cookies 封装:$cookies.get/set/remove
let $cookies: any;
// naive-ui useMessage 实例:$msg.success/warning/error/info
let $msg: any;
// pinia store 聚合:$store.nav.useNavStore() / $store.log.useLogStore()
let $store: any;
// 全局弹窗:$modal({ title, content, contType: 'text'|'input', ... })
let $modal: any;
interface Window {
// 扩展Windows环境下的全局$http对象
$http: any;
$cookies: any;
$msg: any;
$store: any;
$modal: any;
}
}
export { };