new VueRouter({ mode : ‘hash’, routes : [] }) window.addEventListener(‘hashchange’,方法名或方法)
new VueRouter({ mode : ‘history’, routes : [] }) window.addEventListener(‘popstate’,方法名或方法)
Vue路由模式及监听
原文:https://www.cnblogs.com/katydids/p/9944640.html