88999c4961
- 调整全站毛玻璃背景、光晕与渐变的透明度,降低色彩饱和度使视觉更柔和 - 替换 $http 全局类型声明,改用具体模块类型替代 any - 增强 API 请求函数类型,使用 Record<string, unknown> 替代 any,新增泛型响应接口 - 修复热搜标题与热度数字颜色,支持 hover 变色 - 新增四川母暴龙自定义代理配置文件
31 lines
958 B
TypeScript
31 lines
958 B
TypeScript
/// <reference types="vite/client" />
|
|
/// <reference types="axios" />
|
|
/// <reference types="vue-router/auto" />
|
|
import type HttpApi from "@/config/http";
|
|
|
|
// 全局变量:由 src/config/index.ts 的 useConfig() 与 src/Index.vue 注册,
|
|
// 使用时不需 import(均挂载在 window 上)
|
|
declare global {
|
|
// API 聚合对象:$http.<模块>.<函数>(),模块见 src/api/*/index.ts
|
|
let $http: typeof HttpApi;
|
|
// 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: typeof HttpApi;
|
|
$cookies: any;
|
|
$msg: any;
|
|
$store: any;
|
|
$modal: any;
|
|
}
|
|
}
|
|
|
|
export { };
|
|
|