vue-router 去掉#

vue-router 默认的路由模式是hash,我们要去掉url中的#需要将路由模式切换为history

const router = new VueRouter({
    mode : 'history'
});

  至于去掉#之后会产生什么问题,可以参考这篇内容:

https://www.cnblogs.com/hanshuai/p/9930063.html

posted @ 2019-02-18 22:25  carrie_zhao  阅读(2754)  评论(0)    收藏  举报