强制刷新组件

//div
      
 data() {
    return {
      isrefresh: true,
     modelComponent: ''
    }
  },
 handleTabClick(index) {
      if (this.dataType === index) {
        return;
      }
      this.isrefresh = this.isrefresh ? false : true
      if (this.canGoOn()) {
        this.dataType = index;
        if (index !== 0 ) {
          this.$nextTick(()=>{ //强制刷新组件
            this.isrefresh = this.isrefresh ? false : true
            this.modelComponent = 'datamodel';
          })
        }
      }
    },

你可能感兴趣的:(强制刷新组件)