去掉vue项目url中的# 效果图 方法 router/index.js里加上mode: 'history’就可以了 const router = new VueRouter({ mode: 'history', routes })