beforeRouteLeave (to, from, next) {
if (to.name === 'pageA') { /* pageA是需要跳转的路由 */
// console.log('返回管理页面')
if (this.$vnode && this.$vnode.data.keepAlive) {
if (this.$vnode.parent && this.$vnode.parent.componentInstance && this.$vnode.parent.componentInstance.cache) {
if (this.$vnode.componentOptions) {
var key = this.$vnode.key == null
? this.$vnode.componentOptions.Ctor.cid + (this.$vnode.componentOptions.tag ? `::${this.$vnode.componentOptions.tag}` : '')
: this.$vnode.key
var cache = this.$vnode.parent.componentInstance.cache
var keys = this.$vnode.parent.componentInstance.keys
if (cache[key]) {
if (keys.length) {
var index = keys.indexOf(key)
if (index > -1) {
keys.splice(index, 1)
}
}
delete cache[key]
}
}
}
}
this.$destroy()
}
next()
},

  

最新文章

  1. 带进度条的 jQuery 文件拖放上传插件
  2. 由json字符串生成C#实体类的工具
  3. asp.net 防止按钮重复提交
  4. zepto - slice
  5. Android 通过Dom, Sax, Pull解析网络xml数据
  6. shell中的ps3为何物以及select循环
  7. 2018-2019-2 20165325 网络对抗技术 Exp4 恶意代码分析
  8. 利用zabbix api添加、删除、禁用主机
  9. 三目算法、if/else,switch/case运用
  10. 响应式web设计(一)
  11. Python程序的编写方式
  12. python网络编程之UDP方式传输数据
  13. Eclipse集成Maven进行开发
  14. 几种always块的形态
  15. Oracle 故障整理
  16. JSP使用sessionScope获取session值
  17. 【搜索】 Prime Path
  18. 2018.11.01 bzoj4872: [Shoi2017]分手是祝愿(期望dp)
  19. Eclipse自定义的透视图如何删除掉?
  20. MCS锁和CLH锁

热门文章

  1. 【LeetCode】885. Spiral Matrix III 解题报告(Python & C++)
  2. 【LeetCode】528. Random Pick with Weight 解题报告(Python)
  3. Codeforces A. Orchestra
  4. Pikachu漏洞练习-SQL-inject(持续更新)
  5. AlexNet: ImageNet Classification with Deep Convolutional Neural Networks
  6. [opencv]利用minAreaRect计算平面矩形的旋转角度
  7. Linux_at任务调度
  8. jquery控制元素的隐藏和显示的几种方法
  9. Count Sequences
  10. c# - 关于位移符号 >> 和 << 的使用