如题,使用vue-router html5模式时,当我直接输入某页面具体的url或者刷新当前页面,都会出现404 not found 错误。请问该如何解决?(因哈希模式中含“#!”导致某些配置不可用,所以必须使用html5模式= =)
1 回答

冉冉说
TA贡献1877条经验 获得超1个赞
这种问题不是应该RTFM吗……
Router Options | vue-router documentation npm package
history
default: false
Enables HTML5 history mode. Leverages history.pushState()
and history.replaceState()
for history management.
Note: when using the history mode, the server needs to be properly configured so that a user directly visiting a deep link on your site doesn't get a 404.
添加回答
举报
0/150
提交
取消