cloud-b2b 1.1.60 → 1.1.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/Search2/Search.less +0 -1
- package/es/SuperTable2/SuperTable2.js +20 -15
- package/es/SuperTable2/SuperTable2.less +2 -1
- package/es/style.less +2 -1
- package/lib/Search2/Search.less +0 -1
- package/lib/SuperTable2/SuperTable2.js +20 -15
- package/lib/SuperTable2/SuperTable2.less +2 -1
- package/lib/style.less +2 -1
- package/package.json +1 -1
package/es/Search2/Search.less
CHANGED
|
@@ -426,6 +426,11 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
426
426
|
return function (value, record, index) {
|
|
427
427
|
var _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10;
|
|
428
428
|
var realType = record._isEdit === true && _this.canReadonly(col.type) ? col.editType : col.type;
|
|
429
|
+
if (realType === 'customType') {
|
|
430
|
+
var _this$props$items$rec = _this.props.items[record.key].__customType,
|
|
431
|
+
__customType = _this$props$items$rec === void 0 ? _defineProperty({}, col.key, 'text') : _this$props$items$rec;
|
|
432
|
+
realType = __customType[col.key];
|
|
433
|
+
}
|
|
429
434
|
if (!realType) {
|
|
430
435
|
return /*#__PURE__*/React.createElement("div", {
|
|
431
436
|
onDoubleClick: _this.onDoubleClick(col.key, record.key),
|
|
@@ -594,12 +599,12 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
594
599
|
return null;
|
|
595
600
|
}
|
|
596
601
|
});
|
|
597
|
-
_defineProperty(_assertThisInitialized(_this), "getColumnTitle", function (
|
|
598
|
-
var required =
|
|
599
|
-
title =
|
|
600
|
-
type =
|
|
601
|
-
key =
|
|
602
|
-
showAdd =
|
|
602
|
+
_defineProperty(_assertThisInitialized(_this), "getColumnTitle", function (_ref16) {
|
|
603
|
+
var required = _ref16.required,
|
|
604
|
+
title = _ref16.title,
|
|
605
|
+
type = _ref16.type,
|
|
606
|
+
key = _ref16.key,
|
|
607
|
+
showAdd = _ref16.showAdd;
|
|
603
608
|
if (type === 'checkbox') {
|
|
604
609
|
var status = _this.getCheckedStatus(key);
|
|
605
610
|
return /*#__PURE__*/React.createElement(_Checkbox, _extends({
|
|
@@ -612,9 +617,9 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
612
617
|
}, title, _this.toAdd(key, showAdd));
|
|
613
618
|
}
|
|
614
619
|
});
|
|
615
|
-
_defineProperty(_assertThisInitialized(_this), "getColumnClassName", function (
|
|
616
|
-
var type =
|
|
617
|
-
align =
|
|
620
|
+
_defineProperty(_assertThisInitialized(_this), "getColumnClassName", function (_ref17) {
|
|
621
|
+
var type = _ref17.type,
|
|
622
|
+
align = _ref17.align;
|
|
618
623
|
if (type === 'index' || type === 'checkbox') {
|
|
619
624
|
return 'ant-table-selection-column';
|
|
620
625
|
} else {
|
|
@@ -630,9 +635,9 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
630
635
|
var readonly = _this.props.readonly;
|
|
631
636
|
return _mapInstanceProperty(_context12 = _filterInstanceProperty(cols).call(cols, function (col) {
|
|
632
637
|
return !col.hide;
|
|
633
|
-
})).call(_context12, function (
|
|
638
|
+
})).call(_context12, function (_ref18, index) {
|
|
634
639
|
var _context13;
|
|
635
|
-
var col = _extends({}, (_objectDestructuringEmpty(
|
|
640
|
+
var col = _extends({}, (_objectDestructuringEmpty(_ref18), _ref18));
|
|
636
641
|
col.className = _this.getColumnClassName(col);
|
|
637
642
|
col.title = _this.getColumnTitle(col);
|
|
638
643
|
col.dataIndex = col.key;
|
|
@@ -673,11 +678,11 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
673
678
|
});
|
|
674
679
|
_defineProperty(_assertThisInitialized(_this), "getDataSource", function (items, cols) {
|
|
675
680
|
return _mapInstanceProperty(items).call(items, function (item, index) {
|
|
676
|
-
return _reduceInstanceProperty(cols).call(cols, function (result,
|
|
681
|
+
return _reduceInstanceProperty(cols).call(cols, function (result, _ref19) {
|
|
677
682
|
var _context14, _context15;
|
|
678
|
-
var key =
|
|
679
|
-
type =
|
|
680
|
-
options =
|
|
683
|
+
var key = _ref19.key,
|
|
684
|
+
type = _ref19.type,
|
|
685
|
+
options = _ref19.options;
|
|
681
686
|
if (!_this.props.readonly && type && type !== 'readonly' && (!item.isReadonly || _Array$isArray(item.isReadonly) && !_includesInstanceProperty(_context14 = item.isReadonly).call(_context14, key)) || _includesInstanceProperty(_context15 = ['img', 'switch', 'custom', 'img', 'toolbar', 'uploadImg']).call(_context15, type)) {
|
|
682
687
|
result[key] = item[key];
|
|
683
688
|
} else {
|
package/es/style.less
CHANGED
package/lib/Search2/Search.less
CHANGED
|
@@ -439,6 +439,11 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
439
439
|
return function (value, record, index) {
|
|
440
440
|
var _context3, _context4, _context5, _context6, _context7, _context8, _context9, _context10;
|
|
441
441
|
var realType = record._isEdit === true && _this.canReadonly(col.type) ? col.editType : col.type;
|
|
442
|
+
if (realType === 'customType') {
|
|
443
|
+
var _this$props$items$rec = _this.props.items[record.key].__customType,
|
|
444
|
+
__customType = _this$props$items$rec === void 0 ? (0, _defineProperty2["default"])({}, col.key, 'text') : _this$props$items$rec;
|
|
445
|
+
realType = __customType[col.key];
|
|
446
|
+
}
|
|
442
447
|
if (!realType) {
|
|
443
448
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
444
449
|
onDoubleClick: _this.onDoubleClick(col.key, record.key),
|
|
@@ -607,12 +612,12 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
607
612
|
return null;
|
|
608
613
|
}
|
|
609
614
|
});
|
|
610
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumnTitle", function (
|
|
611
|
-
var required =
|
|
612
|
-
title =
|
|
613
|
-
type =
|
|
614
|
-
key =
|
|
615
|
-
showAdd =
|
|
615
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumnTitle", function (_ref16) {
|
|
616
|
+
var required = _ref16.required,
|
|
617
|
+
title = _ref16.title,
|
|
618
|
+
type = _ref16.type,
|
|
619
|
+
key = _ref16.key,
|
|
620
|
+
showAdd = _ref16.showAdd;
|
|
616
621
|
if (type === 'checkbox') {
|
|
617
622
|
var status = _this.getCheckedStatus(key);
|
|
618
623
|
return /*#__PURE__*/_react["default"].createElement(_checkbox["default"], (0, _extends2["default"])({
|
|
@@ -625,9 +630,9 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
625
630
|
}, title, _this.toAdd(key, showAdd));
|
|
626
631
|
}
|
|
627
632
|
});
|
|
628
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumnClassName", function (
|
|
629
|
-
var type =
|
|
630
|
-
align =
|
|
633
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getColumnClassName", function (_ref17) {
|
|
634
|
+
var type = _ref17.type,
|
|
635
|
+
align = _ref17.align;
|
|
631
636
|
if (type === 'index' || type === 'checkbox') {
|
|
632
637
|
return 'ant-table-selection-column';
|
|
633
638
|
} else {
|
|
@@ -643,9 +648,9 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
643
648
|
var readonly = _this.props.readonly;
|
|
644
649
|
return (0, _map["default"])(_context12 = (0, _filter["default"])(cols).call(cols, function (col) {
|
|
645
650
|
return !col.hide;
|
|
646
|
-
})).call(_context12, function (
|
|
651
|
+
})).call(_context12, function (_ref18, index) {
|
|
647
652
|
var _context13;
|
|
648
|
-
var col = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(
|
|
653
|
+
var col = (0, _extends2["default"])({}, ((0, _objectDestructuringEmpty2["default"])(_ref18), _ref18));
|
|
649
654
|
col.className = _this.getColumnClassName(col);
|
|
650
655
|
col.title = _this.getColumnTitle(col);
|
|
651
656
|
col.dataIndex = col.key;
|
|
@@ -686,11 +691,11 @@ var SuperTable2 = /*#__PURE__*/function (_React$Component) {
|
|
|
686
691
|
});
|
|
687
692
|
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getDataSource", function (items, cols) {
|
|
688
693
|
return (0, _map["default"])(items).call(items, function (item, index) {
|
|
689
|
-
return (0, _reduce["default"])(cols).call(cols, function (result,
|
|
694
|
+
return (0, _reduce["default"])(cols).call(cols, function (result, _ref19) {
|
|
690
695
|
var _context14, _context15;
|
|
691
|
-
var key =
|
|
692
|
-
type =
|
|
693
|
-
options =
|
|
696
|
+
var key = _ref19.key,
|
|
697
|
+
type = _ref19.type,
|
|
698
|
+
options = _ref19.options;
|
|
694
699
|
if (!_this.props.readonly && type && type !== 'readonly' && (!item.isReadonly || (0, _isArray["default"])(item.isReadonly) && !(0, _includes["default"])(_context14 = item.isReadonly).call(_context14, key)) || (0, _includes["default"])(_context15 = ['img', 'switch', 'custom', 'img', 'toolbar', 'uploadImg']).call(_context15, type)) {
|
|
695
700
|
result[key] = item[key];
|
|
696
701
|
} else {
|
package/lib/style.less
CHANGED