2020
10-08
10-08
解决vue+router路由跳转不起作用的一项原因
如下所示:Vue.use(Router)exportdefaultnewRouter({mode:'history',routes:[{path:'/',component:Login},{path:'/login',component:Login},{path:'/register',component:Register},{path:'/*',component:NotFound},]})记得要写上mode:'history',原因如下补充知识:vue-router配置后地址栏输入跳转不成功问题在起服务的js中增加connect-history-api-fallbackconsthistory=require('conn...
继续阅读 >