美文网首页
ant-design-vue表格选择回显

ant-design-vue表格选择回显

作者: shaguamayi | 来源:发表于2022-07-27 16:08 被阅读0次
rowSelection: {
          selectedRowKeys: this.selectedRowKeys,
          onChange: this.onSelectChange,
          getCheckboxProps: this.getCheckboxProps
        },


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

相关文章

网友评论

      本文标题:ant-design-vue表格选择回显

      本文链接:https://www.haomeiwen.com/subject/emuzirtx.html