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:
pengYYYYY 2021-09-01 18:22:21 +08:00
parent 07b671d9e9
commit c62ba2cf6c
4 changed files with 10 additions and 3 deletions

4
globals.d.ts vendored
View File

@ -1,3 +1,4 @@
// 通用声明
declare type ClassName = { [className: string]: any } | ClassName[] | string;
@ -5,9 +6,12 @@ declare interface ImportMeta {
env: {
MODE: 'mock' | 'development' | 'test' | 'release';
};
glob: (url: string) => {};
}
declare module '*.svg' {
const content: string;
export default content;
}

View File

@ -1,10 +1,9 @@
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router';
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 fristPagesModules = import.meta.glob('../pages/*.vue');
const modules = Object.assign({}, layoutModules, fristPagesModules, pagesModules);
const getMenuRoutes = (list) => {

View File

@ -8,7 +8,11 @@ export interface State {
}
export const key: InjectionKey<Store<State>> = Symbol();
export const store = createStore<State>({
modules: {
user,
setting,
notification,
},
});

View File

@ -15,5 +15,5 @@
"@/*": ["./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"]
}