hash和history

匿名 (未验证) 提交于 2019-12-02 23:57:01

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"
}

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!