Skip to content
This repository was archived by the owner on Oct 27, 2021. It is now read-only.

Commit 6cc1af9

Browse files
committed
fix(AtGrid): 修复 AtGrid 点击事件
1 parent 0ee50e2 commit 6cc1af9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/grid/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export default {
4040
* @param {event} event
4141
*/
4242
handleClick(item, index, row, event) {
43-
const { onClick, columnNum } = this.props
43+
const { onClick, columnNum } = this
4444
if (typeof onClick === 'function') {
4545
const clickIndex = row * columnNum + index
4646
onClick(item, clickIndex, event)
@@ -70,7 +70,7 @@ export default {
7070
class={classNames(bodyClass, {
7171
'at-grid-item--last': index === columnNum - 1,
7272
})}
73-
onClick={this.handleClick.bind(this, childItem, index, i)}
73+
onTap={this.handleClick.bind(this, childItem, index, i)}
7474
style={{
7575
flex: `0 0 ${100 / columnNum}%`,
7676
}}>

0 commit comments

Comments
 (0)