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.
这种问题不是应该RTFM吗……
Router Options | vue-router documentation npm package
history
default: false
Enables HTML5 history mode. Leverages
history.pushState()andhistory.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.