vue+router路由跳转不起作用的一项原因
程序员文章站
2022-03-13 09:25:35
vue.use(router)
export default new router({
mode:'history',
routes: [
{ path:...
vue.use(router)
export default new router({
mode:'history',
routes: [
{ path: '/', component: login },
{ path: '/login', component: login },
{ path: '/register',component: register},
{path: '/*', component: notfound},
]
})
记得要写上 mode:'history',
上一篇: 一款简洁的纯css3代码实现的动画导航