el-table回显多选数据,toggleRowSelection失效

  nextTick(() => {
          rows.forEach(_row => {
            let mid = state.tableData.find(row => row.id === _row.id)
            unitTableRef.value.toggleRowSelection(mid ? mid : _row, selected) //必须指针一致。分页数据保持原值渲染
          })
        })

开启分页多选时,pageChange时调用;

你可能感兴趣的:(vue.js,javascript,前端)