vue-router的mode

hash和history

hash

1.url地址中带有#

2.不能随意的修改path地址

3.在 HTTP 请求中,对后端完全没有影响,因此改变 hash 不会重新加载页面。

history

1.页面刷新重新请求接口

2.可以随意修改path地址,可以进入404

原文地址:https://www.cnblogs.com/vancissell/p/12969907.html