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删除。