摘要:
$router是VueRouter的实例,在script标签中想要导航到不同的URL,使用$router.push方法。 返回上一个历史history用$router.to(-1) $route为当前router跳转对象。里面可以获取当前路由的name,path,query,parmas等。 阅读全文
摘要:
window.history指向History对象,它表示当前窗口的浏览历史。 History对象保存了当前窗口访问过的所有页面网址。 等同于 方法: window.history.pushState(state,title,url) 向历史中添加一条记录 阅读全文