radio切换后,表格数据记住之前选中的行

created() {
    this.tableData = this.tableList[0];
  },
  mounted() {},
  methods: {
    handleSelectionChange(val) {
      this.multipleSelection[this.radio1] = val;
    },
    selectChange(e) {
      this.radio1 = e;
      this.tableData = this.tableList[e - 1];

      setTimeout(this.toggls,100,this.multipleSelection[e])
    },
    toggls(row){
      if(row && row.length!=0){
        row.forEach(element => {
          this.$refs.multipleTable.toggleRowSelection(element,true);
        });
      }
    }

 

 

 

posted @ 2021-05-08 10:54  啦咯  阅读(125)  评论(0编辑  收藏  举报