前端路由跳转,核心实现依靠一个事件,即监听hash值变化的。

    window.onhashchange = function(){
    //location.hash可以获取到最新的hash值
    location.hash
}

location.hash_vueRouter