首页 > 其他 > 详细

ant table中通过赋值取消选中值

时间:2020-02-07 10:27:57      阅读:373      评论:0      收藏:0      [点我收藏+]

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重新赋值即可改变选中状态

ant table中通过赋值取消选中值

原文:https://www.cnblogs.com/eternityz/p/12271904.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!