element-ui table行和多选框的联动选择

// 高亮显示选择行
highlight-current-row
// table 事件绑定
@row-click="rowFinanceChecked" @select-all="(selection)=>payEntry.checks = selection.map((m) => m.id)" @select="(selection)=>payEntry.checks = selection.map((m) => m.id)
// 选中行事件
rowFinanceChecked(row, column, event) {
      const index = this.payEntry.checks.indexOf(row.id)
      if (index >= 0) {
        this.$refs.needPayBill.toggleRowSelection(row, false)
        this.payEntry.checks.splice(index, 1)
      } else {
        this.$refs.needPayBill.toggleRowSelection(row, true)
        this.payEntry.checks.push(row.id)
      }
    },
上一篇:XML+JSON面试题都在这里


下一篇:机器学习 基础理论 学习笔记 (8)特征选择(feature selection)(一)