vue mode: 'history'

2018-10-16  本文已影响0人  张大丶

vue去掉#号
需要在 router上加上以下参数:

mode: 'history',
base:'/项目名称/目录名称',

修改 config /index.js

build 下面 assetsPublicPath: “/项目名称/目录名称/”

后端 匹配 /项目名称/目录名称/ 下面的资源,重定向到打包后的index.html

参考链接:
https://segmentfault.com/a/1190000012408232

上一篇 下一篇

猜你喜欢

热点阅读