原路由文件
export default new Router({
routes: [
{
path: '/',
name: 'IndexPage',
component: IndexPage
}
]
})
修改后路由文件
export default new Router({
base: '/dist/',//需要加上不然那访问路由是空白的
mode: 'history',
routes: [
{
path: '/',
name: 'IndexPage',
component: IndexPage
}
]
})
修改内容添加 mode: ‘history’,
mode: 'history',
可以写入路由参数http://localhost:8080?id=0
用于首页登录验证跳转