问题:使用Vue路由后面带有 ‘/#/’ 锚点
解决:修改路由文件(src>router>index.js)
/* 没修改前 */
export default new Router({
routes: [
{
path: '/',
name: 'IndexPage',
component: IndexPage
}
]
})
/* 修改后,router同级添加(mode: 'history') */
export default new Router({
mode: 'history'
routes: [
{
path: '/',
name: 'IndexPage',
component: IndexPage
}
]
})