请教: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路由 如图
![image](https://private-user-images.githubusercontent.com/130677115/332389131-ebcfa746-5c42-487d-9b7f-3db5ec87528d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE0NjA1MTEsIm5iZiI6MTcyMTQ2MDIxMSwicGF0aCI6Ii8xMzA2NzcxMTUvMzMyMzg5MTMxLWViY2ZhNzQ2LTVjNDItNDg3ZC05YjdmLTNkYjVlYzg3NTI4ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzIwJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcyMFQwNzIzMzFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04YjQ5NjhkZTg2Y2JlNTY0MmQ5MmU0NDM0NWU3MDBiOTllZjhlOGJiNjI1YWYwMjA2ZTM0ZGU0NjM2YjgxOWNhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.mtaOK7RMwN1P7MHULYVA4lAMlQ5amU7xGWvGG_iR4RY)
最终生成的路由表是这样
[ { "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