1. // 移除监听事件
    destroyed() {

     window.removeEventListener('resize', this.resizeWin)

    }

  2. // 移除对dom的操作
    destroyed() {

     $("body").removeClass('maven-select');

    }

  3. // 因为EventBus不会凭空隐没,所以须要销毁EventBus相干定义的事件,否则始终会以指数型形式触发 $emit
    destroyed() {

     bus.$off('get', this.myhandle)

    }

  4. // 销毁VueX中存储的数据,否则页面不刷新,在页面刚渲染时,始终展现的是上次的数据
    destroyed() {

     this.$store.dispatch("cleartList");

    }

  5. // 清空浏览器localStorage种植的某些变量
    destroyed() {

     window.localStorage.removeItem("ID");

    }

  6. // 销毁定时器
    destroyed() {

     clearInterval(this.timer); this.timer = null;

    }

  7. // beforeDestroy 移除echarts的所有鼠标事件以及清空会话
    beforeDestroy() {

     this.chartDom.off('click'); this.chartDom.clear();

    }