请教:umi3.5想要实现404路由,如何配置 #12411
Unanswered
jiajiaxing1
asked this question in
Q&A
Replies: 1 comment
-
umi 3 不维护了,建议升级到 umi 4 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
想要实现
点击/system-management/account可以展示页面
点击/system-management/account1跳转到404
在route里面配置了404路由 如图
最终生成的路由表是这样
[ { "path": "/umi/plugin/openapi", "component": {} }, { "path": "/", "component": {}, "routes": [ { "path": "/system-management", "name": "系统管理", "key": "系统管理", "icon": "control", "routes": [ { "path": "/system-management/account", "name": "操作员管理", "key": "操作员管理", "icon": null }, { "exact": true, "path": "/system-management", "redirect": "/system-management/account" } ], "children": [ { "path": "/system-management/account", "name": "操作员管理", "key": "操作员管理", "icon": null }, { "exact": true, "path": "/system-management", "redirect": "/system-management/account" } ] }, { "path": "/*", "component": {}, "layout": false, "name": "404", "exact": true } ], "children": [ { "path": "/system-management", "name": "系统管理", "key": "系统管理", "icon": "control", "routes": [ { "path": "/system-management/account", "name": "操作员管理", "key": "操作员管理", "icon": null }, { "exact": true, "path": "/system-management", "redirect": "/system-management/account" } ], "children": [ { "path": "/system-management/account", "name": "操作员管理", "key": "操作员管理", "icon": null }, { "exact": true, "path": "/system-management", "redirect": "/system-management/account" } ] }, { "path": "/*", "component": {}, "layout": false, "name": "404", "exact": true } ] } ]
Beta Was this translation helpful? Give feedback.
All reactions