
export const mixBeforeRouteLeave = {
  beforeRouteLeave(to, from, next) {
    // 但是第一次刷新进入带了timeStamp的数据会不好使=。=
    if (from.meta.keepAlive && this.cacheRoute && !this.cacheRoute.includes(to.path)) {
      const idx = this.$vnode.parent.componentInstance.keys.indexOf(this.$route.fullPath);
      const key = this.$vnode.parent.componentInstance.keys[idx];
      const cache = this.$vnode.parent.componentInstance.cache;
      delete cache[key];
    }
    next();
  }
};