本地项目运行下对应修改配置:
1.router 配置文件index.js
2.vue.config.js (vue cli4.x) publicPath属性 "./" 改为“/” (对应报错:页面404)
3.index.html 中调用的文件路径采用绝对路径‘/’,相对路径下页面刷新页面会出错
参考文章:
vue router嵌套路由在history模式下刷新无法渲染页面问题的解决方法
解决vue router使用history模式带参数刷新报错
vue-cli 3.x 如何配置assetsPublicPath; vue.config.js如何更改assetsPublicPath配置;