摘要: router.beforeEach((to,from,next)=>{ //从from跳转到to document.title=to.matched[0].meta.title console.log(to) next() //这步必须要调用 }) //后置钩子 router.afterEach(( 阅读全文
posted @ 2020-07-29 14:07 咖啡无眠 阅读(262) 评论(0) 推荐(0) 编辑
摘要: import Vue from 'vue' import Router from 'vue-router' Router.prototype.go = function(t) { this.isBack = true console.log('go ' + this.history.current. 阅读全文
posted @ 2020-07-29 08:32 咖啡无眠 阅读(450) 评论(0) 推荐(0) 编辑