vue中table

<a-table ref="table"
       size="middle"
       bordered
       rowKey="id"
       :columns="columns"
       :dataSource="dataSources"
       :pagination="ipagination"
       :loading="loading"
       :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, fixed: true}"
       @change="handleTableChange">
</a-table>

js部分

methods: {
    transfer(values){
      console.log("清除选中")
      //values为空数组
      this.selectedRowKeys=values;
    },
}

将selectedRowKeys重新赋值即可改变选中状态

相关文章:

  • 2022-12-23
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-07
  • 2022-12-23
  • 2021-10-26
  • 2021-08-09
  • 2021-07-14
  • 2022-12-23
相关资源
相似解决方案