|
|
@ -12,7 +12,7 @@ import { Table } from 'antd'; |
|
|
|
const columns = [{ |
|
|
|
title: '姓名', |
|
|
|
dataIndex: 'name', |
|
|
|
render: function(text) { |
|
|
|
render: function (text) { |
|
|
|
return <a href="#">{text}</a>; |
|
|
|
} |
|
|
|
}, { |
|
|
@ -41,7 +41,7 @@ const data = [{ |
|
|
|
|
|
|
|
// 通过 rowSelection 对象表明需要行选择 |
|
|
|
const rowSelection = { |
|
|
|
getCheckboxProps: function(record) { |
|
|
|
getCheckboxProps: function (record) { |
|
|
|
return { |
|
|
|
defaultChecked: record.name === '李大嘴', // 配置默认勾选的列 |
|
|
|
disabled: record.name === '胡彦祖' // 配置无法勾选的列 |
|
|
@ -50,10 +50,10 @@ const rowSelection = { |
|
|
|
onChange(selectedRowKeys) { |
|
|
|
console.log('selectedRowKeys changed: ' + selectedRowKeys); |
|
|
|
}, |
|
|
|
onSelect: function(record, selected, selectedRows) { |
|
|
|
onSelect: function (record, selected, selectedRows) { |
|
|
|
console.log(record, selected, selectedRows); |
|
|
|
}, |
|
|
|
onSelectAll: function(selected, selectedRows) { |
|
|
|
onSelectAll: function (selected, selectedRows) { |
|
|
|
console.log(selected, selectedRows); |
|
|
|
}, |
|
|
|
}; |
|
|
|