vue路由的两种模式hash和history

当我们使用vue脚手架搭建项目的时候,会发现有这么一个选项 Use history mode for router? (如果选择vue默认的方式创建脚手架,采用的是history模式的。)

vue路由的两种模式hash和history

hash模式与history模式的区别及优缺点详见:

  https://segmentfault.com/a/1190000015123061

  https://blog.csdn.net/lla520/article/details/77894985/