去掉onRowDoubleClick默认值

This commit is contained in:
yangchch6 2019-12-13 17:22:14 +08:00
parent e182ad3714
commit bf414ad479
6 changed files with 15 additions and 13 deletions

View File

@ -137,8 +137,8 @@ var defaultProps = {
onExpand: function onExpand() {},
onExpandedRowsChange: function onExpandedRowsChange() {},
onRowClick: function onRowClick() {},
onRowDoubleClick: function onRowDoubleClick() {},
// onRowDoubleClick() { },
clsPrefix: 'u-table',
bodyStyle: {},
style: {},

View File

@ -64,7 +64,8 @@ var propTypes = {
var defaultProps = {
onRowClick: function onRowClick() {},
onRowDoubleClick: function onRowDoubleClick() {},
// onRowDoubleClick() {},
onDestroy: function onDestroy() {},
expandIconColumnIndex: 0,
@ -503,7 +504,7 @@ var TableRow = function (_Component) {
if (expandable && expandRowByClick) {
onExpand(!expanded, record, fixedIndex, event);
}
if (onRowDoubleClick.toString() === 'function onRowDoubleClick() {}') {
if (!onRowDoubleClick) {
onRowClick(record, fixedIndex, event);
return;
}
@ -520,7 +521,7 @@ var TableRow = function (_Component) {
fixedIndex = _props6.fixedIndex;
this.clear();
onRowDoubleClick(record, fixedIndex, event);
onRowDoubleClick && onRowDoubleClick(record, fixedIndex, event);
};
TableRow.prototype.onMouseEnter = function onMouseEnter(e) {

9
dist/demo.js vendored
View File

@ -37156,8 +37156,8 @@
onExpand: function onExpand() {},
onExpandedRowsChange: function onExpandedRowsChange() {},
onRowClick: function onRowClick() {},
onRowDoubleClick: function onRowDoubleClick() {},
// onRowDoubleClick() { },
clsPrefix: 'u-table',
bodyStyle: {},
style: {},
@ -38756,7 +38756,8 @@
var defaultProps = {
onRowClick: function onRowClick() {},
onRowDoubleClick: function onRowDoubleClick() {},
// onRowDoubleClick() {},
onDestroy: function onDestroy() {},
expandIconColumnIndex: 0,
@ -39195,7 +39196,7 @@
if (expandable && expandRowByClick) {
onExpand(!expanded, record, fixedIndex, event);
}
if (onRowDoubleClick.toString() === 'function onRowDoubleClick() {}') {
if (!onRowDoubleClick) {
onRowClick(record, fixedIndex, event);
return;
}
@ -39212,7 +39213,7 @@
fixedIndex = _props6.fixedIndex;
this.clear();
onRowDoubleClick(record, fixedIndex, event);
onRowDoubleClick && onRowDoubleClick(record, fixedIndex, event);
};
TableRow.prototype.onMouseEnter = function onMouseEnter(e) {

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -77,7 +77,7 @@ const defaultProps = {
onExpand() { },
onExpandedRowsChange() { },
onRowClick() { },
onRowDoubleClick() { },
// onRowDoubleClick() { },
clsPrefix: 'u-table',
bodyStyle: {},
style: {},

View File

@ -37,7 +37,7 @@ const propTypes = {
const defaultProps = {
onRowClick() {},
onRowDoubleClick() {},
// onRowDoubleClick() {},
onDestroy() {},
expandIconColumnIndex: 0,
expandRowByClick: false,
@ -402,7 +402,7 @@ class TableRow extends Component{
if (expandable && expandRowByClick) {
onExpand(!expanded, record, fixedIndex,event);
}
if(onRowDoubleClick.toString() === 'function onRowDoubleClick() {}'){
if(!onRowDoubleClick){
onRowClick(record, fixedIndex, event);
return;
}
@ -414,7 +414,7 @@ class TableRow extends Component{
onRowDoubleClick(event) {
const { record, index, onRowDoubleClick,fixedIndex } = this.props;
this.clear();
onRowDoubleClick(record, fixedIndex, event);
onRowDoubleClick && onRowDoubleClick(record, fixedIndex, event);
}
onMouseEnter(e) {