vue+router路由跳转不起作用的一项原因
程序员文章站
2022-06-26 09:18:49
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',