Skip to content

Commit

Permalink
Update router-and-nav.md (PanJiaChen#102)
Browse files Browse the repository at this point in the history
Co-authored-by: 花裤衩 <panfree23@gmail.com>
  • Loading branch information
likwotsing and PanJiaChen authored Dec 4, 2020
1 parent 8a40605 commit 3f8d511
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/zh/guide/essentials/router-and-nav.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ meta: {
path: '/permission',
component: Layout,
redirect: '/permission/index', //重定向地址,在面包屑中点击会重定向去的地址
hidden: true, // 不在侧边栏线上
hidden: true, // 不在侧边栏显示
alwaysShow: true, //一直显示根路由
meta: { roles: ['admin','editor'] }, //你可以在根路由设置权限,这样它下面所有的子路由都继承了这个权限
children: [{
Expand Down Expand Up @@ -84,7 +84,7 @@ meta: {
其它的配置和 [vue-router](https://router.vuejs.org/zh-cn/) 官方并没有区别,自行查看文档。

::: warning 注意事项
如果这里有一个需要非常注意的地方就是 `404` 页面一定要最后加载,如果放在 constantRoutes 一同声明了 `404`后面的所以页面都会被拦截到`404` ,详细的问题见 [addRoutes when you've got a wildcard route for 404s does not work](https://github.com/vuejs/vue-router/issues/1176)
如果这里有一个需要非常注意的地方就是 `404` 页面一定要最后加载,如果放在 constantRoutes 一同声明了 `404`后面的所有页面都会被拦截到`404` ,详细的问题见 [addRoutes when you've got a wildcard route for 404s does not work](https://github.com/vuejs/vue-router/issues/1176)
:::

<br>
Expand Down

0 comments on commit 3f8d511

Please sign in to comment.