mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-11-10 11:44:40 +08:00
fix: ts error (merge request !5)
Squash merge branch 'fix/tserror' into 'develop' fix: ts error Co-author: pengYYYYY <pengyue970715@gmail.com>
This commit is contained in:
parent
07b671d9e9
commit
c62ba2cf6c
4
globals.d.ts
vendored
4
globals.d.ts
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
// 通用声明
|
// 通用声明
|
||||||
declare type ClassName = { [className: string]: any } | ClassName[] | string;
|
declare type ClassName = { [className: string]: any } | ClassName[] | string;
|
||||||
|
|
||||||
|
@ -5,9 +6,12 @@ declare interface ImportMeta {
|
||||||
env: {
|
env: {
|
||||||
MODE: 'mock' | 'development' | 'test' | 'release';
|
MODE: 'mock' | 'development' | 'test' | 'release';
|
||||||
};
|
};
|
||||||
|
glob: (url: string) => {};
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module '*.svg' {
|
declare module '*.svg' {
|
||||||
const content: string;
|
const content: string;
|
||||||
export default content;
|
export default content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
|
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
|
||||||
import routeConfig from '@/config/routes';
|
import routeConfig from '@/config/routes';
|
||||||
|
|
||||||
const layoutModules = import.meta.glob('../layouts/*');
|
const layoutModules = import.meta.glob('../Layouts/*');
|
||||||
const pagesModules = import.meta.glob('../pages/**/*.vue');
|
const pagesModules = import.meta.glob('../pages/**/*.vue');
|
||||||
const fristPagesModules = import.meta.glob('../pages/*.vue');
|
const fristPagesModules = import.meta.glob('../pages/*.vue');
|
||||||
|
|
||||||
const modules = Object.assign({}, layoutModules, fristPagesModules, pagesModules);
|
const modules = Object.assign({}, layoutModules, fristPagesModules, pagesModules);
|
||||||
|
|
||||||
const getMenuRoutes = (list) => {
|
const getMenuRoutes = (list) => {
|
||||||
|
|
|
@ -8,7 +8,11 @@ export interface State {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const key: InjectionKey<Store<State>> = Symbol();
|
export const key: InjectionKey<Store<State>> = Symbol();
|
||||||
|
|
||||||
|
export const store = createStore<State>({
|
||||||
|
modules: {
|
||||||
user,
|
user,
|
||||||
|
setting,
|
||||||
notification,
|
notification,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -15,5 +15,5 @@
|
||||||
"@/*": ["./src/*"]
|
"@/*": ["./src/*"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "src/config/proxy.ts", "src/pages/detail/base/index.js"]
|
"include": ["**/*.ts", "src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", "src/config/proxy.ts", "src/pages/detail/base/index.js"]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user