vue-router 默认的路由模式是hash,我们要去掉url中的#需要将路由模式切换为history
const router = new VueRouter({ mode : 'history' });
至于去掉#之后会产生什么问题,可以参考这篇内容:
vue-router 默认的路由模式是hash,我们要去掉url中的#需要将路由模式切换为history
const router = new VueRouter({ mode : 'history' });
至于去掉#之后会产生什么问题,可以参考这篇内容: