vue-router之路由属性配置说明(十)
生活随笔
收集整理的這篇文章主要介紹了
vue-router之路由属性配置说明(十)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
代碼如下:
export?default?new?Router({mode:?'history',?//路由模式,取值為history與hashbase:?'/',?//打包路徑,默認為/,可以修改routes:?[{path:?string,?//路徑ccomponent:?Component;?//頁面組件name:?string;?//?命名路由-路由名稱components:?{?[name:?string]:?Component?};?//?命名視圖組件redirect:?string?|?Location?|?Function;?//?重定向props:?boolean?|?string?|?Function;?//?路由組件傳遞參數alias:?string?|?Array<string>;?//?路由別名children:?Array<RouteConfig>;?//?嵌套子路由beforeEnter?:?(to:?Route,?from:?Route,?next:?Function)?=>?void;?//?路由單獨鉤子meta:?any;?//?自定義標簽屬性,比如:是否需要登錄icon:?any;?//?圖標//?2.6.0+caseSensitive:?boolean;?//?匹配規則是否大小寫敏感?(默認值:false)pathToRegexpOptions:?Object;?//?編譯正則的選項}]})轉載于:https://blog.51cto.com/4547985/2390813
總結
以上是生活随笔為你收集整理的vue-router之路由属性配置说明(十)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 冲刺4
- 下一篇: Java的新项目学成在线笔记-day10