linkmore-design 1.1.27-alpha.1 → 1.1.27-alpha.4
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/dist/LmEditTable/EditTable.d.ts +4 -0
- package/dist/LmEditTable/util.d.ts +3 -1
- package/dist/index.umd.js +428 -43
- package/dist/index.umd.min.js +21 -21
- package/dist/variables.css +17 -0
- package/es/CustomTableOption/style/index.css +3 -0
- package/es/CustomTableOption/style/variables.css +3 -0
- package/es/LmEditTable/EditTable.d.ts +4 -0
- package/es/LmEditTable/EditTable.js +329 -12
- package/es/LmEditTable/rowSort/DndContainerRow.js +4 -2
- package/es/LmEditTable/style/index.css +14 -0
- package/es/LmEditTable/style/variables.css +14 -0
- package/es/LmEditTable/util.d.ts +3 -1
- package/es/LmEditTable/util.js +61 -8
- package/es/LmEditTable/virtual/VirtualRow.js +11 -5
- package/es/LmEditTable/virtual/VirtualTable.js +3 -1
- package/es/LmFilter/baseFilter/index.js +3 -2
- package/es/LmFilter/filterFns/index.js +4 -2
- package/es/LmUpload/body/UploadCore.js +1 -1
- package/es/Radio/index.js +9 -1
- package/es/Switch/index.js +7 -2
- package/es/styles/variables.css +17 -0
- package/lib/CustomTableOption/style/index.css +3 -0
- package/lib/CustomTableOption/style/variables.css +3 -0
- package/lib/LmEditTable/EditTable.d.ts +4 -0
- package/lib/LmEditTable/EditTable.js +328 -11
- package/lib/LmEditTable/rowSort/DndContainerRow.js +3 -2
- package/lib/LmEditTable/style/index.css +14 -0
- package/lib/LmEditTable/style/variables.css +14 -0
- package/lib/LmEditTable/util.d.ts +3 -1
- package/lib/LmEditTable/util.js +62 -7
- package/lib/LmEditTable/virtual/VirtualRow.js +11 -5
- package/lib/LmEditTable/virtual/VirtualTable.js +3 -1
- package/lib/LmFilter/baseFilter/index.js +3 -2
- package/lib/LmFilter/filterFns/index.js +4 -2
- package/lib/LmUpload/body/UploadCore.js +1 -1
- package/lib/Radio/index.js +9 -1
- package/lib/Switch/index.js +9 -2
- package/lib/styles/variables.css +17 -0
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -91007,8 +91007,9 @@
|
|
|
91007
91007
|
// 二级过滤 => 基础过滤组件
|
|
91008
91008
|
var LmFilterBase = /*#__PURE__*/React__default['default'].memo(function (_ref) {
|
|
91009
91009
|
var instance = _ref.instance;
|
|
91010
|
-
var dataSource = instance.dataSource
|
|
91011
|
-
|
|
91010
|
+
var dataSource = instance.dataSource,
|
|
91011
|
+
enableSearch = instance.enableSearch;
|
|
91012
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, enableSearch && /*#__PURE__*/React__default['default'].createElement(FuzzySearch, {
|
|
91012
91013
|
instance: instance
|
|
91013
91014
|
}), dataSource.map(function (v, index) {
|
|
91014
91015
|
var isHidden = !v.show && typeof v.show === 'boolean';
|
|
@@ -92881,6 +92882,7 @@
|
|
|
92881
92882
|
|
|
92882
92883
|
if (getIsHas(itemValue) && !!item) {
|
|
92883
92884
|
return [].concat(_toConsumableArray$1(pre), [{
|
|
92885
|
+
relation: obj[cur].mode || 'and',
|
|
92884
92886
|
fieldName: cur,
|
|
92885
92887
|
fieldType: (item === null || item === void 0 ? void 0 : item.valueType) || 'string',
|
|
92886
92888
|
type: item.type,
|
|
@@ -92890,7 +92892,7 @@
|
|
|
92890
92892
|
* and 等同于逻辑关系contains: 选中的值包含所有值
|
|
92891
92893
|
* or 等同于逻辑关系in: 选中的值存在于所有值之中
|
|
92892
92894
|
*/
|
|
92893
|
-
operator:
|
|
92895
|
+
operator: 'in'
|
|
92894
92896
|
}]);
|
|
92895
92897
|
}
|
|
92896
92898
|
|
|
@@ -93056,11 +93058,12 @@
|
|
|
93056
93058
|
if (getIsHas(itemValue) && !!item) {
|
|
93057
93059
|
// eslint-disable-next-line no-param-reassign
|
|
93058
93060
|
pre[cur] = {
|
|
93061
|
+
relation: complexFilter[cur].mode || 'and',
|
|
93059
93062
|
fieldName: cur,
|
|
93060
93063
|
fieldType: (item === null || item === void 0 ? void 0 : item.valueType) || 'string',
|
|
93061
93064
|
type: item.type,
|
|
93062
93065
|
value: Array.isArray(itemValue) ? itemValue : [itemValue],
|
|
93063
|
-
operator:
|
|
93066
|
+
operator: 'in'
|
|
93064
93067
|
};
|
|
93065
93068
|
}
|
|
93066
93069
|
|
|
@@ -182040,7 +182043,7 @@
|
|
|
182040
182043
|
var isUploading = getUploadStatus().uploading;
|
|
182041
182044
|
if (isUploading) return;
|
|
182042
182045
|
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.click();
|
|
182043
|
-
}, [getUploadStatus]); // 上传触发事件
|
|
182046
|
+
}, [disabled, getUploadStatus]); // 上传触发事件
|
|
182044
182047
|
|
|
182045
182048
|
var uploadChange = React.useCallback(function (e) {
|
|
182046
182049
|
var _inputRef$current2;
|
|
@@ -288702,14 +288705,18 @@
|
|
|
288702
288705
|
}));
|
|
288703
288706
|
};
|
|
288704
288707
|
|
|
288705
|
-
var _excluded$2g = ["children"],
|
|
288708
|
+
var _excluded$2g = ["children", "disabled"],
|
|
288706
288709
|
_excluded2$y = ["children", "size", "buttonStyle", "direction", "className"];
|
|
288707
288710
|
|
|
288708
288711
|
var LMRadio = function LMRadio(props) {
|
|
288709
288712
|
var children = props.children,
|
|
288713
|
+
customDisabled = props.disabled,
|
|
288710
288714
|
restProps = _objectWithoutProperties$1(props, _excluded$2g);
|
|
288711
288715
|
|
|
288716
|
+
var disabled = React__default['default'].useContext(DisabledContext$1);
|
|
288717
|
+
var mergedDisabled = customDisabled || disabled;
|
|
288712
288718
|
return /*#__PURE__*/React__default['default'].createElement(Radio$1, _extends$2({
|
|
288719
|
+
disabled: mergedDisabled,
|
|
288713
288720
|
className: "lm-radio"
|
|
288714
288721
|
}, restProps), children);
|
|
288715
288722
|
};
|
|
@@ -293639,17 +293646,21 @@
|
|
|
293639
293646
|
Tabs$3.TabPane = TabPane$3;
|
|
293640
293647
|
Tabs$3.AntdTabs = Tabs$1;
|
|
293641
293648
|
|
|
293642
|
-
var _excluded$2w = ["size", "className"];
|
|
293649
|
+
var _excluded$2w = ["size", "className", "disabled"];
|
|
293643
293650
|
|
|
293644
293651
|
var Switch$2 = function Switch(props) {
|
|
293645
293652
|
var _props$size = props.size,
|
|
293646
293653
|
size = _props$size === void 0 ? 'default' : _props$size,
|
|
293647
293654
|
className = props.className,
|
|
293655
|
+
customDisabled = props.disabled,
|
|
293648
293656
|
restProps = _objectWithoutProperties$1(props, _excluded$2w);
|
|
293649
293657
|
|
|
293658
|
+
var disabled = React__default['default'].useContext(DisabledContext$1);
|
|
293659
|
+
var mergedDisabled = customDisabled || disabled;
|
|
293650
293660
|
var classs = classnames('lm-switch', className, _defineProperty$1({}, "lm-switch-".concat(size), size));
|
|
293651
293661
|
return /*#__PURE__*/React__default['default'].createElement(Switch$1, _objectSpread(_objectSpread({
|
|
293652
|
-
className: classs
|
|
293662
|
+
className: classs,
|
|
293663
|
+
disabled: mergedDisabled
|
|
293653
293664
|
}, restProps), {}, {
|
|
293654
293665
|
size: size
|
|
293655
293666
|
}));
|
|
@@ -312886,6 +312897,7 @@
|
|
|
312886
312897
|
var VirtualTable$1 = /*#__PURE__*/React__default['default'].memo(function (tableProps) {
|
|
312887
312898
|
var _bodyRef$current, _tableProps$children$3, _tableProps$children$4, _bodyRef$current2;
|
|
312888
312899
|
|
|
312900
|
+
var fn = tableProps.fn;
|
|
312889
312901
|
var bodyRef = React.useRef(null);
|
|
312890
312902
|
|
|
312891
312903
|
var _useRealive = useRealive$1(),
|
|
@@ -312904,7 +312916,8 @@
|
|
|
312904
312916
|
return state.rowHeight;
|
|
312905
312917
|
}, [state.rowHeight]),
|
|
312906
312918
|
overscan: 5
|
|
312907
|
-
});
|
|
312919
|
+
});
|
|
312920
|
+
fn.current = rowVirtual.scrollToIndex; // 列动态宽度
|
|
312908
312921
|
|
|
312909
312922
|
var columnEstimateSize = React.useCallback(function (i) {
|
|
312910
312923
|
var _tableProps$children$, _tableProps$children$2;
|
|
@@ -313011,6 +313024,8 @@
|
|
|
313011
313024
|
var _excluded$2Q = ["children", "pref"];
|
|
313012
313025
|
|
|
313013
313026
|
var useOptions$3 = function useOptions(_ref) {
|
|
313027
|
+
var _sliceColumns$centerC4;
|
|
313028
|
+
|
|
313014
313029
|
var children = _ref.children,
|
|
313015
313030
|
ref = _ref.ref,
|
|
313016
313031
|
trRef = _ref.trRef;
|
|
@@ -313024,7 +313039,9 @@
|
|
|
313024
313039
|
var rowHeight = state.rowHeight,
|
|
313025
313040
|
totalLen = state.totalLen;
|
|
313026
313041
|
var sliceColumns = React.useMemo(function () {
|
|
313027
|
-
|
|
313042
|
+
var _children$reduce;
|
|
313043
|
+
|
|
313044
|
+
return children === null || children === void 0 ? void 0 : (_children$reduce = children.reduce) === null || _children$reduce === void 0 ? void 0 : _children$reduce.call(children, function (pre, cur) {
|
|
313028
313045
|
var _cur$props, _cur$props2;
|
|
313029
313046
|
|
|
313030
313047
|
if (typeof ((_cur$props = cur.props) === null || _cur$props === void 0 ? void 0 : _cur$props.fixLeft) === 'number') {
|
|
@@ -313053,9 +313070,9 @@
|
|
|
313053
313070
|
}, [sliceColumns]); // 非固定列长度
|
|
313054
313071
|
|
|
313055
313072
|
var centerColumnsLen = React.useMemo(function () {
|
|
313056
|
-
var _sliceColumns$centerC;
|
|
313073
|
+
var _sliceColumns$centerC, _sliceColumns$centerC2;
|
|
313057
313074
|
|
|
313058
|
-
return (_sliceColumns$centerC = sliceColumns.centerColumns.length) !== null && _sliceColumns$centerC !== void 0 ? _sliceColumns$centerC : 0;
|
|
313075
|
+
return (_sliceColumns$centerC = sliceColumns === null || sliceColumns === void 0 ? void 0 : (_sliceColumns$centerC2 = sliceColumns.centerColumns) === null || _sliceColumns$centerC2 === void 0 ? void 0 : _sliceColumns$centerC2.length) !== null && _sliceColumns$centerC !== void 0 ? _sliceColumns$centerC : 0;
|
|
313059
313076
|
}, [sliceColumns]);
|
|
313060
313077
|
React.useEffect(function () {
|
|
313061
313078
|
if (state.columnsLen !== centerColumnsLen) {
|
|
@@ -313091,8 +313108,10 @@
|
|
|
313091
313108
|
}, [virtualItems]); // 右侧隐藏数量
|
|
313092
313109
|
|
|
313093
313110
|
var rightColSpan = React.useMemo(function () {
|
|
313094
|
-
|
|
313095
|
-
|
|
313111
|
+
var _sliceColumns$centerC3;
|
|
313112
|
+
|
|
313113
|
+
return (sliceColumns === null || sliceColumns === void 0 ? void 0 : (_sliceColumns$centerC3 = sliceColumns.centerColumns) === null || _sliceColumns$centerC3 === void 0 ? void 0 : _sliceColumns$centerC3.length) - (virtualItems === null || virtualItems === void 0 ? void 0 : virtualItems.length) - leftColSpan || 0;
|
|
313114
|
+
}, [sliceColumns === null || sliceColumns === void 0 ? void 0 : (_sliceColumns$centerC4 = sliceColumns.centerColumns) === null || _sliceColumns$centerC4 === void 0 ? void 0 : _sliceColumns$centerC4.length, virtualItems.length, leftColSpan]);
|
|
313096
313115
|
return _objectSpread(_objectSpread({
|
|
313097
313116
|
virtualItems: virtualItems
|
|
313098
313117
|
}, sliceColumns), {}, {
|
|
@@ -313322,7 +313341,7 @@
|
|
|
313322
313341
|
return isExpandRow(children) ? children === null || children === void 0 ? void 0 : (_children$2 = children[0]) === null || _children$2 === void 0 ? void 0 : (_children$2$props = _children$2.props) === null || _children$2$props === void 0 ? void 0 : (_children$2$props$chi = _children$2$props.children) === null || _children$2$props$chi === void 0 ? void 0 : (_children$2$props$chi2 = _children$2$props$chi[1]) === null || _children$2$props$chi2 === void 0 ? void 0 : (_children$2$props$chi3 = _children$2$props$chi2.props) === null || _children$2$props$chi3 === void 0 ? void 0 : _children$2$props$chi3['aria-label'] : '';
|
|
313323
313342
|
}
|
|
313324
313343
|
function checkMemoShouldUploadSpecialFun(prev, next) {
|
|
313325
|
-
var _prevCol$componentPro, _nextCol$componentPro, _prevCol$componentPro2, _nextCol$componentPro2, _prevCol$componentPro3, _nextCol$componentPro3, _prevCol$componentPro4, _nextCol$componentPro4, _prevCol$componentPro5, _nextCol$componentPro5, _prevCol$componentPro6, _nextCol$componentPro6;
|
|
313344
|
+
var _prevCol$componentPro, _nextCol$componentPro, _prevCol$componentPro2, _nextCol$componentPro2, _prevCol$componentPro3, _nextCol$componentPro3, _prevCol$componentPro4, _nextCol$componentPro4, _prevCol$componentPro5, _nextCol$componentPro5, _next$className, _prevCol$componentPro6, _nextCol$componentPro6;
|
|
313326
313345
|
|
|
313327
313346
|
var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
|
|
313328
313347
|
|
|
@@ -313376,6 +313395,10 @@
|
|
|
313376
313395
|
return lodash.isEqual(prev.style, next.style);
|
|
313377
313396
|
}
|
|
313378
313397
|
|
|
313398
|
+
if (((_next$className = next.className) === null || _next$className === void 0 ? void 0 : _next$className.indexOf('ant-table-row-expand-icon-cell')) > -1) {
|
|
313399
|
+
return false;
|
|
313400
|
+
}
|
|
313401
|
+
|
|
313379
313402
|
if (next.className.indexOf('ant-table-selection-column') > -1) {
|
|
313380
313403
|
var _prev$children, _prev$children$, _next$children, _next$children$;
|
|
313381
313404
|
|
|
@@ -313402,17 +313425,66 @@
|
|
|
313402
313425
|
});
|
|
313403
313426
|
return arr.length;
|
|
313404
313427
|
}
|
|
313405
|
-
function checkDataSourceIsEmpty(config, dataSource) {
|
|
313428
|
+
function checkDataSourceIsEmpty(config, dataSource, scrollInfo) {
|
|
313429
|
+
var resultConfig = _objectSpread({}, config);
|
|
313430
|
+
|
|
313431
|
+
if (scrollInfo) {
|
|
313432
|
+
var _resultConfig$scroll, _resultConfig$scroll2;
|
|
313433
|
+
|
|
313434
|
+
resultConfig = _objectSpread(_objectSpread({}, resultConfig), {}, {
|
|
313435
|
+
scroll: {
|
|
313436
|
+
x: ((_resultConfig$scroll = resultConfig.scroll) === null || _resultConfig$scroll === void 0 ? void 0 : _resultConfig$scroll.x) || '100%',
|
|
313437
|
+
y: scrollInfo.height || ((_resultConfig$scroll2 = resultConfig.scroll) === null || _resultConfig$scroll2 === void 0 ? void 0 : _resultConfig$scroll2.y)
|
|
313438
|
+
}
|
|
313439
|
+
});
|
|
313440
|
+
}
|
|
313441
|
+
|
|
313406
313442
|
if (dataSource.length) {
|
|
313407
|
-
return
|
|
313443
|
+
return resultConfig;
|
|
313408
313444
|
}
|
|
313409
313445
|
|
|
313410
|
-
return _objectSpread(_objectSpread({},
|
|
313411
|
-
components: _objectSpread(_objectSpread({},
|
|
313446
|
+
return _objectSpread(_objectSpread({}, resultConfig), {}, {
|
|
313447
|
+
components: _objectSpread(_objectSpread({}, resultConfig.components), {}, {
|
|
313412
313448
|
body: {}
|
|
313413
313449
|
})
|
|
313414
313450
|
});
|
|
313415
313451
|
}
|
|
313452
|
+
/** 根据传入的disabedRows, 得出最终需要disabed的rowKeys */
|
|
313453
|
+
|
|
313454
|
+
function checkTableRowIsDisable(deepDataSource, disabledRows, rowKey) {
|
|
313455
|
+
var disabledRkeys = [];
|
|
313456
|
+
|
|
313457
|
+
if (!disabledRows.length) {
|
|
313458
|
+
return disabledRkeys;
|
|
313459
|
+
}
|
|
313460
|
+
|
|
313461
|
+
var disableIds = disabledRows.map(function (item) {
|
|
313462
|
+
return lodash.isObject(item) ? item === null || item === void 0 ? void 0 : item[rowKey] : item;
|
|
313463
|
+
});
|
|
313464
|
+
|
|
313465
|
+
function deep(children, arrs) {
|
|
313466
|
+
children === null || children === void 0 ? void 0 : children.forEach(function (item) {
|
|
313467
|
+
arrs.push(item[rowKey]);
|
|
313468
|
+
|
|
313469
|
+
if (item.children) {
|
|
313470
|
+
deep(item.children, arrs);
|
|
313471
|
+
}
|
|
313472
|
+
});
|
|
313473
|
+
}
|
|
313474
|
+
|
|
313475
|
+
if (disableIds.length) {
|
|
313476
|
+
disableIds === null || disableIds === void 0 ? void 0 : disableIds.forEach(function (item) {
|
|
313477
|
+
disabledRkeys.push(item);
|
|
313478
|
+
var record = deepDataSource[item];
|
|
313479
|
+
|
|
313480
|
+
if (record === null || record === void 0 ? void 0 : record.children) {
|
|
313481
|
+
deep(record.children, disabledRkeys);
|
|
313482
|
+
}
|
|
313483
|
+
});
|
|
313484
|
+
}
|
|
313485
|
+
|
|
313486
|
+
return disabledRkeys;
|
|
313487
|
+
}
|
|
313416
313488
|
|
|
313417
313489
|
var DndContainer$3 = function DndContainer(_ref) {
|
|
313418
313490
|
var children = _ref.children,
|
|
@@ -313463,19 +313535,7 @@
|
|
|
313463
313535
|
if (active.id !== over.id) {
|
|
313464
313536
|
move(active.id, over.id);
|
|
313465
313537
|
}
|
|
313466
|
-
};
|
|
313467
|
-
|
|
313468
|
-
var instance = {
|
|
313469
|
-
isDragging: isDragging,
|
|
313470
|
-
activeId: activeId,
|
|
313471
|
-
options: options,
|
|
313472
|
-
rowKey: rowKey,
|
|
313473
|
-
children: children,
|
|
313474
|
-
move: move,
|
|
313475
|
-
items: items,
|
|
313476
|
-
tableWidth: tableWidth
|
|
313477
|
-
};
|
|
313478
|
-
console.log('instance', instance);
|
|
313538
|
+
}; // @ts-ignore
|
|
313479
313539
|
return /*#__PURE__*/React__default['default'].createElement(DndContext, {
|
|
313480
313540
|
sensors: sensors,
|
|
313481
313541
|
onDragStart: handleDragStart,
|
|
@@ -313694,7 +313754,7 @@
|
|
|
313694
313754
|
_excluded3$b = ["value", "onChange", "record", "rowIndex", "colIndex", "validator"],
|
|
313695
313755
|
_excluded4$2 = ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps"],
|
|
313696
313756
|
_excluded5 = ["onMouseEnter", "onMouseLeave"],
|
|
313697
|
-
_excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "virtual", "sortOpen", "disabled", "colSortOpen", "indexCol", "filterChange", "size", "recordCreatorProps", "shouldUpdate", "loading"];
|
|
313757
|
+
_excluded6 = ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "rowDisabled", "virtual", "sortOpen", "disabled", "colSortOpen", "indexCol", "filterChange", "size", "recordCreatorProps", "shouldUpdate", "loading", "autoSizer"];
|
|
313698
313758
|
var UploadBtn$1 = UploadOss.UploadBtn;
|
|
313699
313759
|
var EditableContext$1 = /*#__PURE__*/React__default['default'].createContext(null); // 表格行
|
|
313700
313760
|
|
|
@@ -313707,8 +313767,12 @@
|
|
|
313707
313767
|
_Form$useForm2 = _slicedToArray$1(_Form$useForm, 1),
|
|
313708
313768
|
form = _Form$useForm2[0];
|
|
313709
313769
|
|
|
313770
|
+
var dataKey = props.dataKey,
|
|
313771
|
+
pushAllForm = props.pushAllForm;
|
|
313772
|
+
pushAllForm === null || pushAllForm === void 0 ? void 0 : pushAllForm(form, dataKey, index);
|
|
313710
313773
|
return /*#__PURE__*/React__default['default'].createElement(Form$4, {
|
|
313711
313774
|
form: form,
|
|
313775
|
+
disabled: props.disabled || false,
|
|
313712
313776
|
component: false
|
|
313713
313777
|
}, /*#__PURE__*/React__default['default'].createElement(EditableContext$1.Provider, {
|
|
313714
313778
|
value: form
|
|
@@ -313723,6 +313787,9 @@
|
|
|
313723
313787
|
_Form$useForm4 = _slicedToArray$1(_Form$useForm3, 1),
|
|
313724
313788
|
form = _Form$useForm4[0];
|
|
313725
313789
|
|
|
313790
|
+
var dataKey = props.dataKey,
|
|
313791
|
+
pushAllForm = props.pushAllForm;
|
|
313792
|
+
pushAllForm === null || pushAllForm === void 0 ? void 0 : pushAllForm(form, dataKey, index);
|
|
313726
313793
|
return /*#__PURE__*/React__default['default'].createElement(Form$4, {
|
|
313727
313794
|
form: form,
|
|
313728
313795
|
disabled: props.disabled || false,
|
|
@@ -314293,6 +314360,7 @@
|
|
|
314293
314360
|
_props$quickOpetateCl = props.quickOpetateClearAll,
|
|
314294
314361
|
quickOpetateClearAll = _props$quickOpetateCl === void 0 ? true : _props$quickOpetateCl,
|
|
314295
314362
|
rowSelection = props.rowSelection,
|
|
314363
|
+
rowDisabled = props.rowDisabled,
|
|
314296
314364
|
virtual = props.virtual,
|
|
314297
314365
|
sortOpen = props.sortOpen,
|
|
314298
314366
|
disabled = props.disabled,
|
|
@@ -314307,6 +314375,8 @@
|
|
|
314307
314375
|
shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
|
|
314308
314376
|
_props$loading = props.loading,
|
|
314309
314377
|
loading = _props$loading === void 0 ? false : _props$loading,
|
|
314378
|
+
_props$autoSizer = props.autoSizer,
|
|
314379
|
+
autoSizer = _props$autoSizer === void 0 ? false : _props$autoSizer,
|
|
314310
314380
|
resetProps = _objectWithoutProperties$1(props, _excluded6);
|
|
314311
314381
|
|
|
314312
314382
|
var _useControllableValue = useControllableValue({
|
|
@@ -314332,6 +314402,14 @@
|
|
|
314332
314402
|
_useControllableValue4 = _slicedToArray$1(_useControllableValue3, 2),
|
|
314333
314403
|
localRowSelectList = _useControllableValue4[0],
|
|
314334
314404
|
setLocalRowSelectList = _useControllableValue4[1];
|
|
314405
|
+
|
|
314406
|
+
var _useControllableValue5 = useControllableValue({
|
|
314407
|
+
value: {
|
|
314408
|
+
disabledRows: (rowDisabled === null || rowDisabled === void 0 ? void 0 : rowDisabled.disabledRows) || []
|
|
314409
|
+
}
|
|
314410
|
+
}),
|
|
314411
|
+
_useControllableValue6 = _slicedToArray$1(_useControllableValue5, 1),
|
|
314412
|
+
localDisabledRows = _useControllableValue6[0];
|
|
314335
314413
|
/** TODO: 当前展开的列 */
|
|
314336
314414
|
|
|
314337
314415
|
|
|
@@ -314344,7 +314422,16 @@
|
|
|
314344
314422
|
var deepDataSourceRef = React.useRef(deepDataSourcePreKeys(dataSource, _rowKey));
|
|
314345
314423
|
dataSourceRef.current = dataSource;
|
|
314346
314424
|
deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
|
|
314425
|
+
var disabledDataSourceRowKeys = React.useRef(checkTableRowIsDisable(deepDataSourceRef.current, localDisabledRows.disabledRows, _rowKey));
|
|
314426
|
+
disabledDataSourceRowKeys.current = checkTableRowIsDisable(deepDataSourceRef.current, localDisabledRows.disabledRows, _rowKey);
|
|
314347
314427
|
var tableWarpRef = React.useRef(null);
|
|
314428
|
+
var autoSizerRef = React.useRef(null);
|
|
314429
|
+
var allFormListRef = React.useRef({});
|
|
314430
|
+
var scrollToIndexRef = React.useRef(null);
|
|
314431
|
+
|
|
314432
|
+
var _Form$useForm5 = Form$4.useForm(),
|
|
314433
|
+
_Form$useForm6 = _slicedToArray$1(_Form$useForm5, 1),
|
|
314434
|
+
checkForm = _Form$useForm6[0];
|
|
314348
314435
|
|
|
314349
314436
|
var onColSortEnd = function onColSortEnd(active, over) {
|
|
314350
314437
|
var _arrayMove;
|
|
@@ -314729,7 +314816,6 @@
|
|
|
314729
314816
|
render: function render(_, record, index) {
|
|
314730
314817
|
var _deepDataSourceRef$cu9, _deepDataSourceRef$cu10, _deepDataSourceRef$cu11;
|
|
314731
314818
|
|
|
314732
|
-
console.log(deepDataSourceRef.current, '--deepDataSourceRef.current', _rowKey);
|
|
314733
314819
|
return ((_deepDataSourceRef$cu9 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu9 === void 0 ? void 0 : (_deepDataSourceRef$cu10 = _deepDataSourceRef$cu9[record[_rowKey]]) === null || _deepDataSourceRef$cu10 === void 0 ? void 0 : (_deepDataSourceRef$cu11 = _deepDataSourceRef$cu10['_deepIds']) === null || _deepDataSourceRef$cu11 === void 0 ? void 0 : _deepDataSourceRef$cu11.join('-')) || "".concat(index + 1);
|
|
314734
314820
|
}
|
|
314735
314821
|
} : _objectSpread(_objectSpread({
|
|
@@ -314900,12 +314986,257 @@
|
|
|
314900
314986
|
},
|
|
314901
314987
|
columns: columns.map(function (item) {
|
|
314902
314988
|
return lodash.omit(item, ['render', 'sorter', 'onFilter', 'filters', 'componentProps', 'formProps', 'editable']);
|
|
314903
|
-
})
|
|
314989
|
+
}),
|
|
314990
|
+
// verify: async () => {
|
|
314991
|
+
// let allRule = {}
|
|
314992
|
+
// let time
|
|
314993
|
+
// let fullNum = 0
|
|
314994
|
+
// columns.forEach((col: any) => {
|
|
314995
|
+
// if (col?.formProps?.rules) {
|
|
314996
|
+
// allRule[col.dataIndex] = col?.formProps?.rules || []
|
|
314997
|
+
// }
|
|
314998
|
+
// })
|
|
314999
|
+
// const validator = new AsyncValidator(allRule);
|
|
315000
|
+
// let flag = true
|
|
315001
|
+
// let messageIndex = null
|
|
315002
|
+
// let errorRowKey = null
|
|
315003
|
+
// let errorInfo = null
|
|
315004
|
+
// const deepValidator = async (data, index) => {
|
|
315005
|
+
// for (let i = 0; i < data.length; i++) {
|
|
315006
|
+
// if (flag) {
|
|
315007
|
+
// try {
|
|
315008
|
+
// await validator.validate(data[i], (errors, fields) => {
|
|
315009
|
+
// if (errors) {
|
|
315010
|
+
// errorInfo = { errors, fields, value: data[i] };
|
|
315011
|
+
// flag = false
|
|
315012
|
+
// messageIndex = index === null ? i : index
|
|
315013
|
+
// errorRowKey = data?.[i]?.[rowKey]
|
|
315014
|
+
// } else if (data[i].children) {
|
|
315015
|
+
// deepValidator(data[i].children, i)
|
|
315016
|
+
// }
|
|
315017
|
+
// })
|
|
315018
|
+
// } catch (error) {
|
|
315019
|
+
// break;
|
|
315020
|
+
// }
|
|
315021
|
+
// }
|
|
315022
|
+
// }
|
|
315023
|
+
// }
|
|
315024
|
+
// await deepValidator(dataSource, null)
|
|
315025
|
+
// console.log(flag, 'fff')
|
|
315026
|
+
// if (flag) {
|
|
315027
|
+
// return Promise.resolve(dataSource)
|
|
315028
|
+
// } else {
|
|
315029
|
+
// setTimeout(() => {
|
|
315030
|
+
// if (messageIndex !== null) {
|
|
315031
|
+
// scrollToIndexRef.current?.(messageIndex, { align: 'center' })
|
|
315032
|
+
// time = setInterval(async () => {
|
|
315033
|
+
// fullNum++
|
|
315034
|
+
// if (fullNum > 5) {
|
|
315035
|
+
// clearInterval(time)
|
|
315036
|
+
// } else {
|
|
315037
|
+
// const form = (Object.values(allFormListRef.current || []).find((item: any) => item.key === errorRowKey) as any)?.form
|
|
315038
|
+
// if (form) {
|
|
315039
|
+
// try {
|
|
315040
|
+
// await form.validateFields()
|
|
315041
|
+
// console.log('验证成功')
|
|
315042
|
+
// } catch (error) {
|
|
315043
|
+
// console.log('验证失败', error)
|
|
315044
|
+
// return error
|
|
315045
|
+
// } finally {
|
|
315046
|
+
// clearInterval(time)
|
|
315047
|
+
// }
|
|
315048
|
+
// }
|
|
315049
|
+
// }
|
|
315050
|
+
// }, 500)
|
|
315051
|
+
// }
|
|
315052
|
+
// }, 100)
|
|
315053
|
+
// return Promise.reject(errorInfo)
|
|
315054
|
+
// }
|
|
315055
|
+
// },
|
|
315056
|
+
verify: function () {
|
|
315057
|
+
var _verify = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee4() {
|
|
315058
|
+
var time, fullNum, flag, messageIndex, errorRowKey, errorInfo, deepValidator;
|
|
315059
|
+
return _regeneratorRuntime$1().wrap(function _callee4$(_context4) {
|
|
315060
|
+
while (1) {
|
|
315061
|
+
switch (_context4.prev = _context4.next) {
|
|
315062
|
+
case 0:
|
|
315063
|
+
fullNum = 0;
|
|
315064
|
+
flag = true;
|
|
315065
|
+
messageIndex = null;
|
|
315066
|
+
errorRowKey = null;
|
|
315067
|
+
errorInfo = null;
|
|
315068
|
+
|
|
315069
|
+
deepValidator = /*#__PURE__*/function () {
|
|
315070
|
+
var _ref13 = _asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee2(data, index) {
|
|
315071
|
+
var i, _data$i;
|
|
315072
|
+
|
|
315073
|
+
return _regeneratorRuntime$1().wrap(function _callee2$(_context2) {
|
|
315074
|
+
while (1) {
|
|
315075
|
+
switch (_context2.prev = _context2.next) {
|
|
315076
|
+
case 0:
|
|
315077
|
+
i = 0;
|
|
315078
|
+
|
|
315079
|
+
case 1:
|
|
315080
|
+
if (!(i < data.length)) {
|
|
315081
|
+
_context2.next = 21;
|
|
315082
|
+
break;
|
|
315083
|
+
}
|
|
315084
|
+
|
|
315085
|
+
if (!flag) {
|
|
315086
|
+
_context2.next = 18;
|
|
315087
|
+
break;
|
|
315088
|
+
}
|
|
315089
|
+
|
|
315090
|
+
_context2.prev = 3;
|
|
315091
|
+
checkForm.resetFields();
|
|
315092
|
+
checkForm.setFieldsValue(data[i]);
|
|
315093
|
+
_context2.next = 8;
|
|
315094
|
+
return checkForm.validateFields();
|
|
315095
|
+
|
|
315096
|
+
case 8:
|
|
315097
|
+
if (data[i].children) {
|
|
315098
|
+
deepValidator(data[i].children, i);
|
|
315099
|
+
}
|
|
315100
|
+
|
|
315101
|
+
_context2.next = 18;
|
|
315102
|
+
break;
|
|
315103
|
+
|
|
315104
|
+
case 11:
|
|
315105
|
+
_context2.prev = 11;
|
|
315106
|
+
_context2.t0 = _context2["catch"](3);
|
|
315107
|
+
errorInfo = {
|
|
315108
|
+
error: _context2.t0,
|
|
315109
|
+
value: data[i]
|
|
315110
|
+
};
|
|
315111
|
+
flag = false;
|
|
315112
|
+
messageIndex = index === null ? i : index;
|
|
315113
|
+
errorRowKey = data === null || data === void 0 ? void 0 : (_data$i = data[i]) === null || _data$i === void 0 ? void 0 : _data$i[_rowKey];
|
|
315114
|
+
return _context2.abrupt("break", 21);
|
|
315115
|
+
|
|
315116
|
+
case 18:
|
|
315117
|
+
i++;
|
|
315118
|
+
_context2.next = 1;
|
|
315119
|
+
break;
|
|
315120
|
+
|
|
315121
|
+
case 21:
|
|
315122
|
+
case "end":
|
|
315123
|
+
return _context2.stop();
|
|
315124
|
+
}
|
|
315125
|
+
}
|
|
315126
|
+
}, _callee2, null, [[3, 11]]);
|
|
315127
|
+
}));
|
|
315128
|
+
|
|
315129
|
+
return function deepValidator(_x2, _x3) {
|
|
315130
|
+
return _ref13.apply(this, arguments);
|
|
315131
|
+
};
|
|
315132
|
+
}();
|
|
315133
|
+
|
|
315134
|
+
_context4.next = 8;
|
|
315135
|
+
return deepValidator(dataSource, null);
|
|
315136
|
+
|
|
315137
|
+
case 8:
|
|
315138
|
+
if (!flag) {
|
|
315139
|
+
_context4.next = 12;
|
|
315140
|
+
break;
|
|
315141
|
+
}
|
|
315142
|
+
|
|
315143
|
+
return _context4.abrupt("return", Promise.resolve(dataSource));
|
|
315144
|
+
|
|
315145
|
+
case 12:
|
|
315146
|
+
setTimeout(function () {
|
|
315147
|
+
if (messageIndex !== null) {
|
|
315148
|
+
var _scrollToIndexRef$cur;
|
|
315149
|
+
|
|
315150
|
+
(_scrollToIndexRef$cur = scrollToIndexRef.current) === null || _scrollToIndexRef$cur === void 0 ? void 0 : _scrollToIndexRef$cur.call(scrollToIndexRef, messageIndex, {
|
|
315151
|
+
align: 'center'
|
|
315152
|
+
});
|
|
315153
|
+
time = setInterval( /*#__PURE__*/_asyncToGenerator$1( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee3() {
|
|
315154
|
+
var _Object$values$find, form;
|
|
315155
|
+
|
|
315156
|
+
return _regeneratorRuntime$1().wrap(function _callee3$(_context3) {
|
|
315157
|
+
while (1) {
|
|
315158
|
+
switch (_context3.prev = _context3.next) {
|
|
315159
|
+
case 0:
|
|
315160
|
+
fullNum++;
|
|
315161
|
+
|
|
315162
|
+
if (!(fullNum > 5)) {
|
|
315163
|
+
_context3.next = 5;
|
|
315164
|
+
break;
|
|
315165
|
+
}
|
|
315166
|
+
|
|
315167
|
+
clearInterval(time);
|
|
315168
|
+
_context3.next = 20;
|
|
315169
|
+
break;
|
|
315170
|
+
|
|
315171
|
+
case 5:
|
|
315172
|
+
form = (_Object$values$find = Object.values(allFormListRef.current || []).find(function (item) {
|
|
315173
|
+
return item.key === errorRowKey;
|
|
315174
|
+
})) === null || _Object$values$find === void 0 ? void 0 : _Object$values$find.form;
|
|
315175
|
+
|
|
315176
|
+
if (!form) {
|
|
315177
|
+
_context3.next = 20;
|
|
315178
|
+
break;
|
|
315179
|
+
}
|
|
315180
|
+
|
|
315181
|
+
_context3.prev = 7;
|
|
315182
|
+
_context3.next = 10;
|
|
315183
|
+
return form.validateFields();
|
|
315184
|
+
|
|
315185
|
+
case 10:
|
|
315186
|
+
console.log('验证成功');
|
|
315187
|
+
_context3.next = 17;
|
|
315188
|
+
break;
|
|
315189
|
+
|
|
315190
|
+
case 13:
|
|
315191
|
+
_context3.prev = 13;
|
|
315192
|
+
_context3.t0 = _context3["catch"](7);
|
|
315193
|
+
console.log('验证失败', _context3.t0);
|
|
315194
|
+
return _context3.abrupt("return", _context3.t0);
|
|
315195
|
+
|
|
315196
|
+
case 17:
|
|
315197
|
+
_context3.prev = 17;
|
|
315198
|
+
clearInterval(time);
|
|
315199
|
+
return _context3.finish(17);
|
|
315200
|
+
|
|
315201
|
+
case 20:
|
|
315202
|
+
case "end":
|
|
315203
|
+
return _context3.stop();
|
|
315204
|
+
}
|
|
315205
|
+
}
|
|
315206
|
+
}, _callee3, null, [[7, 13, 17, 20]]);
|
|
315207
|
+
})), 500);
|
|
315208
|
+
}
|
|
315209
|
+
}, 100);
|
|
315210
|
+
return _context4.abrupt("return", Promise.reject(errorInfo));
|
|
315211
|
+
|
|
315212
|
+
case 14:
|
|
315213
|
+
case "end":
|
|
315214
|
+
return _context4.stop();
|
|
315215
|
+
}
|
|
315216
|
+
}
|
|
315217
|
+
}, _callee4);
|
|
315218
|
+
}));
|
|
315219
|
+
|
|
315220
|
+
function verify() {
|
|
315221
|
+
return _verify.apply(this, arguments);
|
|
315222
|
+
}
|
|
315223
|
+
|
|
315224
|
+
return verify;
|
|
315225
|
+
}()
|
|
314904
315226
|
};
|
|
314905
315227
|
});
|
|
314906
315228
|
var isShowAddAction = React.useMemo(function () {
|
|
314907
315229
|
return isEdit && isAdd || isHoverEdit && isAdd;
|
|
314908
315230
|
}, [isEdit, isAdd, isHoverEdit]);
|
|
315231
|
+
|
|
315232
|
+
var pushAllForm = function pushAllForm(form, key, index) {
|
|
315233
|
+
allFormListRef.current[key] = {
|
|
315234
|
+
form: form,
|
|
315235
|
+
key: key,
|
|
315236
|
+
index: index
|
|
315237
|
+
};
|
|
315238
|
+
};
|
|
315239
|
+
|
|
314909
315240
|
var config = React.useRef(_objectSpread({
|
|
314910
315241
|
pagination: false,
|
|
314911
315242
|
tableLayout: 'fixed',
|
|
@@ -314916,7 +315247,11 @@
|
|
|
314916
315247
|
return record[_rowKey] || record.index || Math.random();
|
|
314917
315248
|
},
|
|
314918
315249
|
components: {
|
|
314919
|
-
table: virtual ?
|
|
315250
|
+
table: virtual ? function (props) {
|
|
315251
|
+
return /*#__PURE__*/React__default['default'].createElement(VirtualTable$1, _objectSpread(_objectSpread({}, props), {}, {
|
|
315252
|
+
fn: scrollToIndexRef
|
|
315253
|
+
}));
|
|
315254
|
+
} : null,
|
|
314920
315255
|
body: Object.assign({
|
|
314921
315256
|
row: function row(rowProps) {
|
|
314922
315257
|
return sortOpen ? EditableSortRow(_objectSpread(_objectSpread({}, rowProps), {}, {
|
|
@@ -314925,7 +315260,7 @@
|
|
|
314925
315260
|
virtual: virtual
|
|
314926
315261
|
}));
|
|
314927
315262
|
},
|
|
314928
|
-
cell: MemoEditableCell
|
|
315263
|
+
cell: props.shouldUpdate ? EditableCell$1 : MemoEditableCell
|
|
314929
315264
|
}, sortOpen ? {
|
|
314930
315265
|
wrapper: function wrapper(wrapperProps) {
|
|
314931
315266
|
var _dataSourceRef$curren2, _tableWarpRef$current, _tableWarpRef$current2;
|
|
@@ -314949,11 +315284,42 @@
|
|
|
314949
315284
|
}
|
|
314950
315285
|
},
|
|
314951
315286
|
onRow: function onRow(record, index) {
|
|
315287
|
+
var _disabledDataSourceRo;
|
|
315288
|
+
|
|
314952
315289
|
return {
|
|
314953
|
-
disabled: disabled
|
|
315290
|
+
disabled: disabled || !!((_disabledDataSourceRo = disabledDataSourceRowKeys.current) === null || _disabledDataSourceRo === void 0 ? void 0 : _disabledDataSourceRo.includes(record[_rowKey])),
|
|
315291
|
+
dataKey: record[_rowKey],
|
|
315292
|
+
index: index,
|
|
315293
|
+
pushAllForm: pushAllForm
|
|
314954
315294
|
};
|
|
314955
315295
|
}
|
|
314956
315296
|
}, resetProps));
|
|
315297
|
+
React.useEffect(function () {
|
|
315298
|
+
if (autoSizer) {
|
|
315299
|
+
var _tableWarpRef$current3;
|
|
315300
|
+
|
|
315301
|
+
var tableClient = tableWarpRef === null || tableWarpRef === void 0 ? void 0 : (_tableWarpRef$current3 = tableWarpRef.current) === null || _tableWarpRef$current3 === void 0 ? void 0 : _tableWarpRef$current3.getBoundingClientRect();
|
|
315302
|
+
var height = (tableClient === null || tableClient === void 0 ? void 0 : tableClient.height) || '100%';
|
|
315303
|
+
var TailorHeight = size === 'middle' ? 48 : 40;
|
|
315304
|
+
|
|
315305
|
+
if (isAdd) {
|
|
315306
|
+
TailorHeight += 48;
|
|
315307
|
+
}
|
|
315308
|
+
|
|
315309
|
+
if (props.summary) {
|
|
315310
|
+
TailorHeight += 48;
|
|
315311
|
+
}
|
|
315312
|
+
|
|
315313
|
+
if (props.pagination) {
|
|
315314
|
+
TailorHeight += 48;
|
|
315315
|
+
}
|
|
315316
|
+
|
|
315317
|
+
autoSizerRef.current = {
|
|
315318
|
+
width: tableClient === null || tableClient === void 0 ? void 0 : tableClient.width,
|
|
315319
|
+
height: typeof height === 'string' ? "calc(".concat(height, " - ").concat(TailorHeight, "px)") : height - TailorHeight
|
|
315320
|
+
};
|
|
315321
|
+
}
|
|
315322
|
+
}, []);
|
|
314957
315323
|
|
|
314958
315324
|
if (colSortOpen) {
|
|
314959
315325
|
var _localRowSelectList$s;
|
|
@@ -314973,7 +315339,7 @@
|
|
|
314973
315339
|
items: columns.reduce(function (acc, item) {
|
|
314974
315340
|
return [].concat(_toConsumableArray$1(acc), [item.dataIndex]);
|
|
314975
315341
|
}, [])
|
|
314976
|
-
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, checkDataSourceIsEmpty(config.current, dataSourceRef.current)), {}, {
|
|
315342
|
+
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, checkDataSourceIsEmpty(config.current, dataSourceRef.current, autoSizerRef.current)), {}, {
|
|
314977
315343
|
loading: loading,
|
|
314978
315344
|
size: size || 'small',
|
|
314979
315345
|
columns: resultColumns,
|
|
@@ -314998,23 +315364,34 @@
|
|
|
314998
315364
|
isShowAddAction: isShowAddAction,
|
|
314999
315365
|
recordCreatorProps: recordCreatorProps,
|
|
315000
315366
|
handleAdd: handleAdd
|
|
315001
|
-
})
|
|
315367
|
+
}), /*#__PURE__*/React__default['default'].createElement(Form$4, {
|
|
315368
|
+
form: checkForm,
|
|
315369
|
+
component: false
|
|
315370
|
+
}, columns.map(function (item) {
|
|
315371
|
+
return /*#__PURE__*/React__default['default'].createElement(Form$4.Item, _objectSpread({
|
|
315372
|
+
noStyle: true,
|
|
315373
|
+
name: item.dataIndex
|
|
315374
|
+
}, (item === null || item === void 0 ? void 0 : item['formProps']) || {}));
|
|
315375
|
+
})));
|
|
315002
315376
|
} // @ts-ignore
|
|
315003
315377
|
|
|
315004
315378
|
|
|
315005
315379
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
315006
|
-
className:
|
|
315380
|
+
className: classnames('lm_editTable_warpper', autoSizer && 'lm_editable_autosize'),
|
|
315007
315381
|
ref: tableWarpRef
|
|
315008
315382
|
}, /*#__PURE__*/React__default['default'].createElement(ConfigProvider$1, {
|
|
315009
315383
|
renderEmpty: loading ? function () {
|
|
315010
315384
|
return null;
|
|
315011
315385
|
} : CustomizeRenderEmpty$1
|
|
315012
|
-
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, checkDataSourceIsEmpty(config.current, dataSourceRef.current)), {}, {
|
|
315386
|
+
}, /*#__PURE__*/React__default['default'].createElement(Table$1, _objectSpread(_objectSpread({}, checkDataSourceIsEmpty(config.current, dataSourceRef.current, autoSizerRef.current)), {}, {
|
|
315013
315387
|
size: size || 'small',
|
|
315014
315388
|
columns: resultColumns,
|
|
315015
315389
|
rowClassName: "editable-row",
|
|
315016
315390
|
bordered: true,
|
|
315017
315391
|
loading: loading,
|
|
315392
|
+
style: autoSizer ? {
|
|
315393
|
+
height: isAdd ? "calc(100% - ".concat(48, "px)") : '100%'
|
|
315394
|
+
} : undefined,
|
|
315018
315395
|
pagination: false,
|
|
315019
315396
|
// components={tableComponents}
|
|
315020
315397
|
expandable: (resetProps === null || resetProps === void 0 ? void 0 : resetProps.expandable) || {
|
|
@@ -315048,7 +315425,15 @@
|
|
|
315048
315425
|
isShowAddAction: isShowAddAction,
|
|
315049
315426
|
recordCreatorProps: recordCreatorProps,
|
|
315050
315427
|
handleAdd: handleAdd
|
|
315051
|
-
})
|
|
315428
|
+
}), /*#__PURE__*/React__default['default'].createElement(Form$4, {
|
|
315429
|
+
form: checkForm,
|
|
315430
|
+
component: false
|
|
315431
|
+
}, columns.map(function (item) {
|
|
315432
|
+
return /*#__PURE__*/React__default['default'].createElement(Form$4.Item, _objectSpread({
|
|
315433
|
+
noStyle: true,
|
|
315434
|
+
name: item.dataIndex
|
|
315435
|
+
}, (item === null || item === void 0 ? void 0 : item['formProps']) || {}));
|
|
315436
|
+
})));
|
|
315052
315437
|
});
|
|
315053
315438
|
var LmEditTable = /*#__PURE__*/React.memo(EditTable$1);
|
|
315054
315439
|
|