ant-design-vue表格选择回显

2022-07-27  本文已影响0人  shaguamayi
rowSelection: {
          selectedRowKeys: this.selectedRowKeys,
          onChange: this.onSelectChange,
          getCheckboxProps: this.getCheckboxProps
        },


getCheckboxProps(record) {
        return {
          props: {
            defaultChecked: record.isSelected
          }
        };
   },
//不过rowKey的需要是key  rowKey="key"。不然选择回显时会错乱
上一篇 下一篇

猜你喜欢

热点阅读