diff --git a/components/table/demo/row-selection-and-operation.md b/components/table/demo/row-selection-and-operation.md index 5f2244cd90..d303aa96cf 100644 --- a/components/table/demo/row-selection-and-operation.md +++ b/components/table/demo/row-selection-and-operation.md @@ -33,7 +33,7 @@ for (let i = 0; i < 46; i++) { const App = React.createClass({ getInitialState() { return { - selectedRowKeys: [], + selectedRowKeys: [], // 这里配置默认勾选列 loading: false, }; }, diff --git a/components/table/demo/row-selection-props.md b/components/table/demo/row-selection-props.md index ed3af7d2b2..3f52c18deb 100644 --- a/components/table/demo/row-selection-props.md +++ b/components/table/demo/row-selection-props.md @@ -12,9 +12,7 @@ import { Table } from 'antd'; const columns = [{ title: '姓名', dataIndex: 'name', - render(text) { - return {text}; - } + render: text => {text}, }, { title: '年龄', dataIndex: 'age' @@ -43,19 +41,9 @@ const data = [{ const rowSelection = { getCheckboxProps(record) { return { - defaultChecked: record.name === '李大嘴', // 配置默认勾选的列 disabled: record.name === '胡彦祖' // 配置无法勾选的列 }; }, - onChange(selectedRowKeys) { - console.log(`selectedRowKeys changed: ${selectedRowKeys}`); - }, - onSelect(record, selected, selectedRows) { - console.log(record, selected, selectedRows); - }, - onSelectAll(selected, selectedRows) { - console.log(selected, selectedRows); - }, }; ReactDOM.render(