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";
1717import { useDispatch , useSelector } from "@/store" ;
1818import { updateCollapsed } from "@/store/module/sidebar" ;
1919import { 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" ;
2222import SvgIcon from "@/components/svgIcon" ;
2323
2424const { Header } = Layout ;
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ import React from "react";
55import { RouteObject } from "@/routers/type" ;
66import lazyLoad from "@/components/lazyLoad" ;
77import Login from "@/views/login" ;
8+ // 懒加载组件
9+ // const Login = lazy(() => import('../views/login'))
810
911// 导入其他模块路由
1012const moduleRoute = import . meta. glob ( "./modules/*" , {
Original file line number Diff line number Diff line change 11import React from "react" ;
22
33import lazyLoad from "@/components/lazyLoad" ;
4- import { RouteObject } from "@routers /type" ;
4+ import { RouteObject } from ".. /type" ;
55
66const errorRoute : RouteObject [ ] = [
77 {
Original file line number Diff line number Diff line change 11import React from "react" ;
22
33import lazyLoad from "@/components/lazyLoad" ;
4- import { RouteObject } from "@routers /type" ;
4+ import { RouteObject } from ".. /type" ;
55import Layouts from "@/components/layouts" ;
66
77const homeRoute : RouteObject [ ] = [
Original file line number Diff line number Diff line change 11import React from "react" ;
22
3- import { RouteObject } from "@routers /type" ;
3+ import { RouteObject } from ".. /type" ;
44import lazyLoad from "@/components/lazyLoad" ;
55import Layouts from "@/components/layouts" ;
66
Original file line number Diff line number Diff line change 11import React from "react" ;
22
3- import { RouteObject } from "@routers /type" ;
3+ import { RouteObject } from ".. /type" ;
44import lazyLoad from "@/components/lazyLoad" ;
55import Layouts from "@/components/layouts" ;
66
Original file line number Diff line number Diff line change 11import { PayloadAction , createSlice } from "@reduxjs/toolkit" ;
22import { SizeType } from "antd/es/config-provider/SizeContext" ;
33
4- import { globalType } from "@store /type" ;
4+ import { globalType } from ".. /type" ;
55
66const initialState : globalType = {
77 token : "" ,
Original file line number Diff line number Diff line change 11import { PayloadAction , createSlice } from "@reduxjs/toolkit" ;
22
3- import { sidebarType } from "@store /type" ;
3+ import { sidebarType } from ".. /type" ;
44
55const initialState : sidebarType = {
66 isCollapsed : true
Original file line number Diff line number Diff line change 2020 "baseUrl" : " ./" ,
2121 // 模块名到基于 baseUrl的路径映射的列表。
2222 "paths" : {
23+ "@" : [
24+ " src"
25+ ],
2326 "@/*" : [
2427 " src/*"
25- ],
26- "@routers/*" : [
27- " src/routers/*"
28- ],
29- "@components/*" : [
30- " src/components/*"
31- ],
32- "@store/*" : [
33- " src/store/*"
34- ],
28+ ]
3529 },
3630 /* Linting */
3731 "strict" : true ,
Original file line number Diff line number Diff line change @@ -25,10 +25,7 @@ export default defineConfig((mode: ConfigEnv): UserConfig => {
2525 resolve : {
2626 // 路径别名
2727 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" )
3229 }
3330 } ,
3431 // 插件配置
You can’t perform that action at this time.
0 commit comments