element-ui table 默认全选

来自:

https://juejin.im/post/5cf24f1ee51d4577583ddc77 侵删

this.deviceTableData = res.body || [];
          // console.log("this.deviceTableData", this.deviceTableData);
          //默认全选
          this.$nextTick(() => {
            for (let i = 0; i < this.deviceTableData.length; i++) {
              this.$refs.multipleTableDevice.toggleRowSelection(
                this.deviceTableData[i],
                true
              );
            }
          });

主要是 “

toggleRowSelection

” 设置

posted @ 2019-08-12 13:38  abcByme  阅读(9128)  评论(0编辑  收藏  举报