第一:在路由文件中配置:src/router/index.js 第二步: 在服务器端,进行访问配置:nginx 配置方案 location / { try_files $uri $uri/ /index.html; } 更多方案,可以看官网指南; https://router.vuejs.org/zh/guide/essentials/history-mode.html#%E5%90%8E%E7%AB%AF%E9%85%8D%E7%BD%AE%E4%BE%8B%E5%AD%90 来源:oschina链接:https://my.oschina.net/u/575762/blog/3195776 标签 路由 vue uri