vue中常用的路由模式
-
hash(#):默認路由模式
-
histroy(/)
export default new Router({ // 路由模式:hash(默認),history模式 mode: 'history', // 修改路由高亮樣式,默認值為'router-link-active' linkActiveClass: 'active' //路由規則 routes:[ { path:'/', name:'index', component:'Index' } ], })
hash(#):默認路由模式
histroy(/)
export default new Router({ // 路由模式:hash(默認),history模式 mode: 'history', // 修改路由高亮樣式,默認值為'router-link-active' linkActiveClass: 'active' //路由規則 routes:[ { path:'/', name:'index', component:'Index' } ], })
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。