hash和history

location.hash="aaa"

history.pushState({},'', "home")

history.replaceState()

history.go(-1)  = history.back()

跳到某一个栈的位置

history.go() 可以正值也可以负值

栈结构,先进后出

history.forward() = history.go(1) 前进一页

<router-link to="/user" tag="li" replace active-ckass="active">user</router-link>
添加replace后,页面无法通过点击返回按钮回退
在router对象中修改{
mode:'history',
linkActiveClass:"active"
}
原文地址:https://www.cnblogs.com/minty/p/11447695.html