<vxe-table
          border
          align="center"
          size="mini"
          show-header-overflow
          show-overflow
          :row-config="{ isHover: true ,keyField:'id'}"
          class="mytable-scrollbar"
          max-height="450"
          :checkbox-config="checkBoxConfig"
        >
        </vxe-table>
//点击事件,获取到所有所选数据
const xTable=ref(null)
const saveClick=()=>{
  const $table = xTable.value
   // getCheckboxRecords 获取当前选中数据
  // getCheckboxReserveRecords 获取已保留选中行数
  //通过_.concat lodash合并两个数组
  const selectRecords 
  =_.concat($table.getCheckboxRecords(),$table.getCheckboxReserveRecords())
}
// 表格checkbox根据条件禁用
const checkBoxConfig = {
  checkMethod: ({ row }) => {
    return !row.disable
  },
  //开启保留翻页选中
  reserve:true
}

原文地址:https://blog.csdn.net/zsj702177/article/details/127367254

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_43922.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注