File tree Expand file tree Collapse file tree 7 files changed +7
-15
lines changed
Expand file tree Collapse file tree 7 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export default antfu({
1919 } ,
2020 } ,
2121 rules : {
22+ "no-console" : "warn" ,
2223 "ts/no-namespace" : 0 ,
2324 "ts/no-unsafe-call" : 0 ,
2425 "ts/no-unsafe-return" : 0 ,
Original file line number Diff line number Diff line change 2323 "dependencies" : {
2424 "@ant-design/icons" : " ^5.3.4" ,
2525 "@babel/runtime" : " ^7.24.0" ,
26- "@unocss/reset" : " ^0.53.6" ,
2726 "antd" : " ^5.15.3" ,
2827 "axios" : " ^1.6.8" ,
2928 "classnames" : " ^2.5.1" ,
Original file line number Diff line number Diff line change 1- @import "@unocss/reset/normalize.css" ;
2-
31@tailwind base;
42@tailwind components;
53@tailwind utilities;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ interface PathRoute {
66 icon ?: any ;
77 notMenu ?: boolean ;
88 redirect ?: string ;
9- component ?: React . LazyExoticComponent ;
9+ component ?: string ;
1010 childrenList ?: Route [ ] ;
1111}
1212interface IndexRoute {
@@ -17,7 +17,7 @@ interface IndexRoute {
1717 icon ?: any ;
1818 notMenu ?: boolean ;
1919 redirect ?: string ;
20- component ?: React . LazyExoticComponent ;
20+ component ?: string ;
2121 childrenList ?: Route [ ] ;
2222}
2323type Route = PathRoute | IndexRoute ;
File renamed without changes.
Original file line number Diff line number Diff line change @@ -35,14 +35,13 @@ const GLOBAL_ROUTERS = {
3535 LOGIN_PAGE : {
3636 path : "/login" ,
3737 title : "登录" ,
38- component : "/login/index " ,
38+ component : "/login" ,
3939 } as Route ,
40-
4140 // 动态路由页面
4241 APP_PAGE : [
4342 {
4443 path : "/" ,
45- component : "/system/ index" ,
44+ component : "/index" ,
4645 childrenList : [
4746 {
4847 title : "首页" ,
@@ -106,12 +105,11 @@ const GLOBAL_ROUTERS = {
106105 ] ,
107106 } ,
108107 ] as Route [ ] ,
109-
110108 // 404
111109 NOT_FOUND_PAGE : {
112110 path : "*" ,
113111 redirect : "/login" ,
114- } as Route ,
112+ } as Route
115113} ;
116114
117115/**
@@ -131,7 +129,7 @@ export function transformRouter(routers: Route[]) {
131129
132130 // 多级嵌套 补全 /
133131 if ( path ?. startsWith ( "/" ) && childrenList ?. length ) {
134- newPath = ( `${ path } /` ) . replace ( / \/ { 2 , } / g, "/" ) ;
132+ newPath = `${ path } /` . replace ( / \/ { 2 , } / g, "/" ) ;
135133 }
136134
137135 const routeObj : Route = {
Original file line number Diff line number Diff line change @@ -15,8 +15,4 @@ module.exports = {
1515 } ,
1616 } ,
1717 plugins : [ ] ,
18- corePlugins : {
19- preflight : false ,
20- } ,
21- important : true ,
2218} ;
You can’t perform that action at this time.
0 commit comments