标签:path new bsp file 知识点 cart pat oms efault
1、改变路由的哈希模式(在路由中会出现#):
在src/router/index.js中
创建路由对象:
const routes = [
{path:"",redirect:"/home"},
{path:"/home",component:Home},
{path:"/cart",comsponent:Cart},
{path:"/profile",component:Profile},
{path:"/category",component:Cart},
]
const router = new Vuerouter({
routes,
mode:‘history‘
})
export default router
将mode改为"history"
标签:path new bsp file 知识点 cart pat oms efault
原文地址:https://www.cnblogs.com/jjbw/p/12129277.html