前端路由: hash & history 模式

1、 history 模式 history原理: 利用H5的 history中新增的两个API pushState() 和 replaceState() 和一个事件onpopstatevue pushState是往history对象里添加一个新的历史记录,即压栈。 replaceState 是替换history对象中的当前历史。 这两个api 接受三个参数:vue-router history.p
相关文章
相关标签/搜索