File tree Expand file tree Collapse file tree 10 files changed +15
-22
lines changed Expand file tree Collapse file tree 10 files changed +15
-22
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ import { SizeType } from "antd/es/config-provider/SizeContext";
17
17
import { useDispatch , useSelector } from "@/store" ;
18
18
import { updateCollapsed } from "@/store/module/sidebar" ;
19
19
import { setComponentSize , setLanguage } from "@/store/module/global" ;
20
- import ThemeComp from "@components/layouts/components /Theme" ;
21
- import FullScreen from "@components/layouts/components /FullScreen" ;
20
+ import ThemeComp from ".. /Theme" ;
21
+ import FullScreen from ".. /FullScreen" ;
22
22
import SvgIcon from "@/components/svgIcon" ;
23
23
24
24
const { Header } = Layout ;
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import React from "react";
5
5
import { RouteObject } from "@/routers/type" ;
6
6
import lazyLoad from "@/components/lazyLoad" ;
7
7
import Login from "@/views/login" ;
8
+ // 懒加载组件
9
+ // const Login = lazy(() => import('../views/login'))
8
10
9
11
// 导入其他模块路由
10
12
const moduleRoute = import . meta. glob ( "./modules/*" , {
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
3
3
import lazyLoad from "@/components/lazyLoad" ;
4
- import { RouteObject } from "@routers /type" ;
4
+ import { RouteObject } from ".. /type" ;
5
5
6
6
const errorRoute : RouteObject [ ] = [
7
7
{
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
3
3
import lazyLoad from "@/components/lazyLoad" ;
4
- import { RouteObject } from "@routers /type" ;
4
+ import { RouteObject } from ".. /type" ;
5
5
import Layouts from "@/components/layouts" ;
6
6
7
7
const homeRoute : RouteObject [ ] = [
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
3
- import { RouteObject } from "@routers /type" ;
3
+ import { RouteObject } from ".. /type" ;
4
4
import lazyLoad from "@/components/lazyLoad" ;
5
5
import Layouts from "@/components/layouts" ;
6
6
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
3
- import { RouteObject } from "@routers /type" ;
3
+ import { RouteObject } from ".. /type" ;
4
4
import lazyLoad from "@/components/lazyLoad" ;
5
5
import Layouts from "@/components/layouts" ;
6
6
Original file line number Diff line number Diff line change 1
1
import { PayloadAction , createSlice } from "@reduxjs/toolkit" ;
2
2
import { SizeType } from "antd/es/config-provider/SizeContext" ;
3
3
4
- import { globalType } from "@store /type" ;
4
+ import { globalType } from ".. /type" ;
5
5
6
6
const initialState : globalType = {
7
7
token : "" ,
Original file line number Diff line number Diff line change 1
1
import { PayloadAction , createSlice } from "@reduxjs/toolkit" ;
2
2
3
- import { sidebarType } from "@store /type" ;
3
+ import { sidebarType } from ".. /type" ;
4
4
5
5
const initialState : sidebarType = {
6
6
isCollapsed : true
Original file line number Diff line number Diff line change 20
20
"baseUrl" : " ./" ,
21
21
// 模块名到基于 baseUrl的路径映射的列表。
22
22
"paths" : {
23
+ "@" : [
24
+ " src"
25
+ ],
23
26
"@/*" : [
24
27
" src/*"
25
- ],
26
- "@routers/*" : [
27
- " src/routers/*"
28
- ],
29
- "@components/*" : [
30
- " src/components/*"
31
- ],
32
- "@store/*" : [
33
- " src/store/*"
34
- ],
28
+ ]
35
29
},
36
30
/* Linting */
37
31
"strict" : true ,
Original file line number Diff line number Diff line change @@ -25,10 +25,7 @@ export default defineConfig((mode: ConfigEnv): UserConfig => {
25
25
resolve : {
26
26
// 路径别名
27
27
alias : {
28
- "@" : resolve ( __dirname , "./src" ) ,
29
- "@components" : resolve ( __dirname , "./src/components" ) ,
30
- "@routers" : resolve ( __dirname , "./src/routers" ) ,
31
- "@store" : resolve ( __dirname , "./src/store" )
28
+ "@" : resolve ( __dirname , "./src" )
32
29
}
33
30
} ,
34
31
// 插件配置
You can’t perform that action at this time.
0 commit comments