From 2004761bede11e0745914e019dca4eedea0f27e4 Mon Sep 17 00:00:00 2001 From: huayj Date: Thu, 22 Aug 2019 16:10:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E7=8E=B0=E8=A1=8C=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=97=B6=E8=A7=A6=E5=8F=91=E5=A4=9A=E9=80=89=E6=A1=86=E5=8B=BE?= =?UTF-8?q?=E9=80=89=E7=9A=84=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/multiSelect.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/multiSelect.js b/src/lib/multiSelect.js index 14f7885..0652269 100644 --- a/src/lib/multiSelect.js +++ b/src/lib/multiSelect.js @@ -193,10 +193,18 @@ export default function multiSelect(Table, Checkbox) { return _defaultColumns.concat(columns); } + // 实现行点击时触发多选框勾选的需求 + onRowClick = (record,index,event) =>{ + this.onCheckboxChange('',record, index)(); + if( this.props.onRowClick ){ + this.props.onRowClick(record,index,event); + } + } + render() { const {columns} = this.props; const {data} = this.state; - return + return
} }; }