提交产出

This commit is contained in:
huayj 2019-08-23 16:07:40 +08:00
parent 96838f575f
commit b6f5cc0abc
5 changed files with 40 additions and 8 deletions

View File

@ -838,7 +838,23 @@ var Table = function (_Component) {
for (var i = 0; i < data.length; i++) {
var isHiddenExpandIcon = void 0;
if (props.showRowNum) {
switch (props.showRowNum.type) {
case 'number':
{
data[i][props.showRowNum.key || '_index'] = i + (props.showRowNum.base || 0);
break;
}
case 'ascii':
{
data[i][props.showRowNum.key || '_index'] = String.fromCharCode(i + (props.showRowNum.base || 0).charCodeAt());
break;
}
default:
{
data[i][props.showRowNum.key || '_index'] = i + (props.showRowNum.base || 0);
break;
}
}
}
var record = data[i];
var key = this.getRowKey(record, i);

View File

@ -382,7 +382,7 @@ function sort(Table, Icon) {
this.defaultSortFn = function (key) {
return function (a, b) {
return a[key] > b[key] ? 1 : -1;
return a[key] >= b[key] ? 1 : -1;
};
};
@ -390,7 +390,7 @@ function sort(Table, Icon) {
return function (a, b) {
var numberA = parseFloat(a[key]);
var numberB = parseFloat(b[key]);
return numberA > numberB ? 1 : -1;
return numberA >= numberB ? 1 : -1;
};
};
}, _temp;

20
dist/demo.js vendored
View File

@ -38317,7 +38317,23 @@
for (var i = 0; i < data.length; i++) {
var isHiddenExpandIcon = void 0;
if (props.showRowNum) {
switch (props.showRowNum.type) {
case 'number':
{
data[i][props.showRowNum.key || '_index'] = i + (props.showRowNum.base || 0);
break;
}
case 'ascii':
{
data[i][props.showRowNum.key || '_index'] = String.fromCharCode(i + (props.showRowNum.base || 0).charCodeAt());
break;
}
default:
{
data[i][props.showRowNum.key || '_index'] = i + (props.showRowNum.base || 0);
break;
}
}
}
var record = data[i];
var key = this.getRowKey(record, i);
@ -296040,7 +296056,7 @@
this.defaultSortFn = function (key) {
return function (a, b) {
return a[key] > b[key] ? 1 : -1;
return a[key] >= b[key] ? 1 : -1;
};
};
@ -296048,7 +296064,7 @@
return function (a, b) {
var numberA = parseFloat(a[key]);
var numberB = parseFloat(b[key]);
return numberA > numberB ? 1 : -1;
return numberA >= numberB ? 1 : -1;
};
};
}, _temp;

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "bee-table",
"version": "2.2.1-beta.1",
"version": "2.2.1-beta.3",
"description": "Table ui component for react",
"keywords": [
"react",