File tree Expand file tree Collapse file tree 6 files changed +27
-9
lines changed
Expand file tree Collapse file tree 6 files changed +27
-9
lines changed Original file line number Diff line number Diff line change 1+ // https://www.typescriptlang.org/tsconfig
12// https://cn.vuejs.org/guide/typescript/overview#configuring-tsconfig-json
23// https://cn.vite.dev/guide/features#typescript-compiler-options
4+
35{
46 "compilerOptions" : {
57 "target" : " esnext" ,
2729 "isolatedModules" : true ,
2830 "skipLibCheck" : true
2931 },
30- // 编译器默认排除的编译文件
32+ // 需要被编译的文件列表
33+ "include" : [
34+ " **/*.ts" ,
35+ " **/*.tsx" ,
36+ " **/*.vue" ,
37+ " **/*.d.ts"
38+ ],
39+ // 从编译中排除的文件列表
3140 "exclude" : [" node_modules" , " dist" ]
3241}
Original file line number Diff line number Diff line change 11/** 声明 vite 环境变量的类型(如果未声明则默认是 any) */
22interface ImportMetaEnv {
33 readonly VITE_APP_TITLE : string
4- readonly VITE_BASE_API : string
4+ readonly VITE_BASE_URL : string
55 readonly VITE_ROUTER_HISTORY : "hash" | "html5"
66 readonly VITE_PUBLIC_PATH : string
77}
Original file line number Diff line number Diff line change 11import type SvgIcon from "@/components/SvgIcon/index.vue"
22
3- /** 由 app.component 全局注册的组件需要在这里声明 TS 类型才能获得 Volar 插件提供的类型提示) */
3+ export { }
4+
5+ // 由 app.component 全局注册的组件需要在这里声明 TS 类型才能获得 Volar 插件提供的类型提示)
46declare module "vue" {
57 export interface GlobalComponents {
68 SvgIcon : typeof SvgIcon
79 }
810}
9-
10- export { }
Original file line number Diff line number Diff line change 1+ import type { Directive } from "vue"
2+
3+ export { }
4+
5+ // 由 app.directive 全局注册的自定义指令需要在这里声明 TS 类型才能获得类型提示
6+ declare module "vue" {
7+ export interface ComponentCustomProperties {
8+ vLoading : Directive < Element , boolean >
9+ vPermission : Directive < Element , string [ ] >
10+ }
11+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import "vue-router"
22
3+ export { }
4+
35declare module "vue-router" {
46 interface RouteMeta {
57 /**
You can’t perform that action at this time.
0 commit comments