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, expandRowByClick = _props5.expandRowByClick,
expanded = _props5.expanded, expanded = _props5.expanded,
onExpand = _props5.onExpand, onExpand = _props5.onExpand,
fixedIndex = _props5.fixedIndex; fixedIndex = _props5.fixedIndex,
onRowDoubleClick = _props5.onRowDoubleClick;
if (expandable && expandRowByClick) { if (expandable && expandRowByClick) {
onExpand(!expanded, record, fixedIndex, event); onExpand(!expanded, record, fixedIndex, event);
} }
if (onRowDoubleClick.toString() === 'function onRowDoubleClick() {}') {
onRowClick(record, fixedIndex, event);
return;
}
this.set(function (e) { this.set(function (e) {
onRowClick(record, fixedIndex, event); onRowClick(record, fixedIndex, event);
}); });

7
dist/demo.js vendored
View File

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