fix:行点击事件有延迟

This commit is contained in:
yangchch6 2019-12-11 17:40:10 +08:00
parent a560c5151d
commit be387369c4
4 changed files with 19 additions and 4 deletions

View File

@ -497,11 +497,16 @@ var TableRow = function (_Component) {
expandRowByClick = _props5.expandRowByClick,
expanded = _props5.expanded,
onExpand = _props5.onExpand,
fixedIndex = _props5.fixedIndex;
fixedIndex = _props5.fixedIndex,
onRowDoubleClick = _props5.onRowDoubleClick;
if (expandable && expandRowByClick) {
onExpand(!expanded, record, fixedIndex, event);
}
if (onRowDoubleClick.toString() === 'function onRowDoubleClick() {}') {
onRowClick(record, fixedIndex, event);
return;
}
this.set(function (e) {
onRowClick(record, fixedIndex, event);
});

7
dist/demo.js vendored
View File

@ -39189,11 +39189,16 @@
expandRowByClick = _props5.expandRowByClick,
expanded = _props5.expanded,
onExpand = _props5.onExpand,
fixedIndex = _props5.fixedIndex;
fixedIndex = _props5.fixedIndex,
onRowDoubleClick = _props5.onRowDoubleClick;
if (expandable && expandRowByClick) {
onExpand(!expanded, record, fixedIndex, event);
}
if (onRowDoubleClick.toString() === 'function onRowDoubleClick() {}') {
onRowClick(record, fixedIndex, event);
return;
}
this.set(function (e) {
onRowClick(record, fixedIndex, event);
});

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -396,11 +396,16 @@ class TableRow extends Component{
expandRowByClick,
expanded,
onExpand,
fixedIndex
fixedIndex,
onRowDoubleClick
} = this.props;
if (expandable && expandRowByClick) {
onExpand(!expanded, record, fixedIndex,event);
}
if(onRowDoubleClick.toString() === 'function onRowDoubleClick() {}'){
onRowClick(record, fixedIndex, event);
return;
}
this.set((e)=> {
onRowClick(record, fixedIndex, event);
});