前端路由: hash & history 模式

1、 history 模式 history原理: 利用H5的 history中新增的兩個API pushState() 和 replaceState() 和一個事件onpopstatevue pushState是往history對象裏添加一個新的歷史記錄,即壓棧。 replaceState 是替換history對象中的當前歷史。 這兩個api 接受三個參數:vue-router history.p
相關文章
相關標籤/搜索