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