vue開發時地址欄上的ip后面會跟着一個#號,如果想去掉這個井號,可以在路由上加上 mode: 'history', 即可去掉
//設置路由
const router = new VueRouter({
mode: "history",
base: __dirname,
routes: [
{ path: "/",component: Customers },
{ path: "/about",component: About },
{ path:"/add",component:Add },
{ path:"/customers/:id",component:CustomerDetails },
{ path:"/edit/:id",component:Edit }
]
})
星星之火可以燎原,願以后的每一天都不留遺憾。