linkmore-design 1.1.13-alpha.5 → 1.1.13-alpha.7
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/CHANGELOG.md +73 -0
- package/dist/LmEditTable/EditTable.d.ts +1 -1
- package/dist/index.umd.js +192 -61
- package/dist/index.umd.min.js +2 -2
- package/dist/variables.css +29 -9
- package/es/LmEditTable/EditTable.d.ts +1 -1
- package/es/LmEditTable/EditTable.js +100 -31
- package/es/LmEditTable/sortableItemCol.js +38 -13
- package/es/LmEditTable/style/index.css +6 -0
- package/es/LmEditTable/style/variables.css +6 -0
- package/es/LmEditTable/util.js +23 -7
- package/es/LmFilter/style/index.css +6 -9
- package/es/LmFilter/style/variables.css +6 -9
- package/es/LmTable/Table.js +14 -8
- package/es/LmUpload/UploadList/ItemPicture.js +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.js +11 -2
- package/es/LmUpload/UploadList/ItemText.js +2 -1
- package/es/LmUpload/UploadList/index.js +2 -1
- package/es/LmUpload/body/UploadCore.js +4 -1
- package/es/LmUpload/style/index.css +17 -0
- package/es/LmUpload/style/variables.css +17 -0
- package/es/TreeSelect/index.js +2 -1
- package/es/styles/variables.css +29 -9
- package/lib/LmEditTable/EditTable.d.ts +1 -1
- package/lib/LmEditTable/EditTable.js +99 -30
- package/lib/LmEditTable/sortableItemCol.js +34 -11
- package/lib/LmEditTable/style/index.css +6 -0
- package/lib/LmEditTable/style/variables.css +6 -0
- package/lib/LmEditTable/util.js +22 -6
- package/lib/LmFilter/style/index.css +6 -9
- package/lib/LmFilter/style/variables.css +6 -9
- package/lib/LmTable/Table.js +14 -8
- package/lib/LmUpload/UploadList/ItemPicture.js +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.js +11 -2
- package/lib/LmUpload/UploadList/ItemText.js +2 -1
- package/lib/LmUpload/UploadList/index.js +2 -1
- package/lib/LmUpload/body/UploadCore.js +5 -1
- package/lib/LmUpload/style/index.css +17 -0
- package/lib/LmUpload/style/variables.css +17 -0
- package/lib/TreeSelect/index.js +2 -1
- package/lib/styles/variables.css +29 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,76 @@
|
|
|
1
|
+
## <small>1.1.23 (2022-10-31)</small>
|
|
2
|
+
|
|
3
|
+
* 1.1.23 ([3a82908](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/3a82908))
|
|
4
|
+
* build: build ([856267e](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/856267e))
|
|
5
|
+
* fix: 修改拖拽移动事件 ([47632d9](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/47632d9))
|
|
6
|
+
* fix: add ([46b85f4](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/46b85f4))
|
|
7
|
+
* fix: change ([86a1282](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/86a1282))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## <small>1.1.22 (2022-10-28)</small>
|
|
12
|
+
|
|
13
|
+
* 1.1.22 ([9a19225](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/9a19225))
|
|
14
|
+
* build: build ([3b79e5e](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/3b79e5e))
|
|
15
|
+
* feat: 筛选组件增加清楚按钮触发方式 ([64ed4c5](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/64ed4c5))
|
|
16
|
+
* fix: 修复lmedittable的选择问题 ([f0ae1f2](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/f0ae1f2))
|
|
17
|
+
* fix: 修改拖拽点 ([336fb8c](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/336fb8c))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## <small>1.1.21 (2022-10-28)</small>
|
|
22
|
+
|
|
23
|
+
* 1.1.21 ([86a2415](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/86a2415))
|
|
24
|
+
* build: build ([1b7c124](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/1b7c124))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## <small>1.1.20 (2022-10-28)</small>
|
|
29
|
+
|
|
30
|
+
* 1.1.20 ([2a6fd92](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/2a6fd92))
|
|
31
|
+
* feat: 描述列表增加行合并 ([2acdcaa](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/2acdcaa))
|
|
32
|
+
* feat: 增加上传组件拖拽功能 ([4e07162](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/4e07162))
|
|
33
|
+
* feat: 增加拖拽组件(实验性) ([62b3eef](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/62b3eef))
|
|
34
|
+
* docs: new lmDrag ([0580608](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/0580608))
|
|
35
|
+
* docs: new lmDrag ([7d8239b](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/7d8239b))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## <small>1.1.19 (2022-10-25)</small>
|
|
40
|
+
|
|
41
|
+
* 1.1.19 ([7cda205](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/7cda205))
|
|
42
|
+
* build: build ([daddea9](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/daddea9))
|
|
43
|
+
* fix: 解锁react版本 ([3652d40](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/3652d40))
|
|
44
|
+
* fix: 添加form从ref 中设置数据无法生效的问题 ([c0b75b6](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/c0b75b6))
|
|
45
|
+
* fix: 修复 cascade inputnumber treeselect 在configProvider中设置size不生效的问题 ([f466792](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/f466792))
|
|
46
|
+
* fix: 修复descriptions每行最后一个存在padding的问题 ([8041520](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/8041520))
|
|
47
|
+
* fix: 修改按钮样式 ([647b669](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/647b669))
|
|
48
|
+
* fix: 修改筛选组件赋值错误问题 ([7b70b7c](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/7b70b7c))
|
|
49
|
+
* fate: 添加Select框带icon功能 ([eee6a75](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/eee6a75))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## <small>1.1.18 (2022-10-24)</small>
|
|
54
|
+
|
|
55
|
+
* 1.1.18 ([1c75789](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/1c75789))
|
|
56
|
+
* fix: 添加快捷菜单在抽屉中的用例 ([ea3dbdf](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/ea3dbdf))
|
|
57
|
+
* fix: 修复propsComponet打包出来的问题。及添加quickmenu的hidden事件 ([277fbdd](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/277fbdd))
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
## <small>1.1.17 (2022-10-21)</small>
|
|
62
|
+
|
|
63
|
+
* 1.1.17 ([f608658](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/f608658))
|
|
64
|
+
* build: build ([ef91efe](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/ef91efe))
|
|
65
|
+
* fix: 修改筛选内置下拉组件样式, 增加额外功能参数 ([b723cfd](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/b723cfd))
|
|
66
|
+
* fix: 修改图片预览旋转图标 ([2c03eb5](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/2c03eb5))
|
|
67
|
+
* feat: 表单响应式布局新版 ([78e8eb6](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/78e8eb6))
|
|
68
|
+
* feat: 增加图标库额外接收url ([a5f1947](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/a5f1947))
|
|
69
|
+
* docs: changlog ([95538b3](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/95538b3))
|
|
70
|
+
* docs: delete no use ([2442aa5](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/2442aa5))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
1
74
|
## <small>1.1.16 (2022-10-21)</small>
|
|
2
75
|
|
|
3
76
|
* 1.1.16 ([ed714ba](https://gitlab.scm321.com/web-group/UFX.SCM.linkDesign/commit/ed714ba))
|
|
@@ -33,7 +33,7 @@ export interface CountdownHandle {
|
|
|
33
33
|
clearSelect: () => void;
|
|
34
34
|
customSetCheckboxRecords: (data: any[]) => void;
|
|
35
35
|
deleteRowData: (record: string | Record<string, any>) => void;
|
|
36
|
-
addRowData: (record: string | Record<string, any>,
|
|
36
|
+
addRowData: (record: string | Record<string, any>, defaultValue?: Record<string, any> | Record<string, any>[], addInChild?: boolean | 'replace') => void;
|
|
37
37
|
valid: () => void;
|
|
38
38
|
}
|
|
39
39
|
interface ILmColumns extends TableColumnType<any> {
|
package/dist/index.umd.js
CHANGED
|
@@ -182022,6 +182022,7 @@
|
|
|
182022
182022
|
var instance = _ref.instance;
|
|
182023
182023
|
var inputRef = React__default['default'].useRef(null);
|
|
182024
182024
|
var accept = instance.accept,
|
|
182025
|
+
disabled = instance.disabled,
|
|
182025
182026
|
children = instance.children,
|
|
182026
182027
|
beforeUpload = instance.beforeUpload,
|
|
182027
182028
|
getUploadStatus = instance.getUploadStatus,
|
|
@@ -182030,6 +182031,7 @@
|
|
|
182030
182031
|
var handleClick = React.useCallback(function () {
|
|
182031
182032
|
var _inputRef$current;
|
|
182032
182033
|
|
|
182034
|
+
if (disabled) return;
|
|
182033
182035
|
var isUploading = getUploadStatus().uploading;
|
|
182034
182036
|
if (isUploading) return;
|
|
182035
182037
|
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.click();
|
|
@@ -182055,7 +182057,7 @@
|
|
|
182055
182057
|
};
|
|
182056
182058
|
return !getIsMaxCount() && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
182057
182059
|
onClick: handleClick,
|
|
182058
|
-
className:
|
|
182060
|
+
className: classnames('lm_upload_core', disabled && 'disabled')
|
|
182059
182061
|
}, children || /*#__PURE__*/React__default['default'].createElement(UploadPicture, {
|
|
182060
182062
|
instance: instance
|
|
182061
182063
|
}), /*#__PURE__*/React__default['default'].createElement("input", _objectSpread({
|
|
@@ -182096,6 +182098,7 @@
|
|
|
182096
182098
|
var file = _ref.file,
|
|
182097
182099
|
instance = _ref.instance;
|
|
182098
182100
|
var readOnly = instance.readOnly,
|
|
182101
|
+
disabled = instance.disabled,
|
|
182099
182102
|
remove = instance.remove,
|
|
182100
182103
|
download = instance.download,
|
|
182101
182104
|
fileNames = instance.fileNames;
|
|
@@ -182112,7 +182115,7 @@
|
|
|
182112
182115
|
onClick: function onClick() {
|
|
182113
182116
|
return download(file);
|
|
182114
182117
|
}
|
|
182115
|
-
}, file[fileNames.fileName])), !readOnly && /*#__PURE__*/React.createElement("div", {
|
|
182118
|
+
}, file[fileNames.fileName])), !readOnly && !disabled && /*#__PURE__*/React.createElement("div", {
|
|
182116
182119
|
className: "text_right lm_upload_item_text_action"
|
|
182117
182120
|
}, /*#__PURE__*/React.createElement("div", {
|
|
182118
182121
|
className: "action_delete",
|
|
@@ -182128,6 +182131,7 @@
|
|
|
182128
182131
|
var file = _ref.file,
|
|
182129
182132
|
instance = _ref.instance;
|
|
182130
182133
|
var readOnly = instance.readOnly,
|
|
182134
|
+
disabled = instance.disabled,
|
|
182131
182135
|
remove = instance.remove,
|
|
182132
182136
|
preview = instance.preview,
|
|
182133
182137
|
download = instance.download,
|
|
@@ -182149,7 +182153,7 @@
|
|
|
182149
182153
|
onClick: function onClick() {
|
|
182150
182154
|
return download(file);
|
|
182151
182155
|
}
|
|
182152
|
-
}, file[fileNames.fileName])), !readOnly && /*#__PURE__*/React.createElement("div", {
|
|
182156
|
+
}, file[fileNames.fileName])), !readOnly && !disabled && /*#__PURE__*/React.createElement("div", {
|
|
182153
182157
|
className: "picture_right lm_upload_item_action"
|
|
182154
182158
|
}, /*#__PURE__*/React.createElement("div", {
|
|
182155
182159
|
className: "action_delete",
|
|
@@ -182225,6 +182229,7 @@
|
|
|
182225
182229
|
instance = _ref.instance,
|
|
182226
182230
|
listeners = _ref.listeners;
|
|
182227
182231
|
var dispatch = instance.dispatch,
|
|
182232
|
+
disabled = instance.disabled,
|
|
182228
182233
|
readOnly = instance.readOnly,
|
|
182229
182234
|
size = instance.size,
|
|
182230
182235
|
remove = instance.remove,
|
|
@@ -182298,7 +182303,15 @@
|
|
|
182298
182303
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
182299
182304
|
className: "lm_upload_item_mask"
|
|
182300
182305
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
182301
|
-
className: "lm_upload_item_action"
|
|
182306
|
+
className: "lm_upload_item_action",
|
|
182307
|
+
onKeyDown: function onKeyDown(e) {
|
|
182308
|
+
e.stopPropagation();
|
|
182309
|
+
e.preventDefault();
|
|
182310
|
+
},
|
|
182311
|
+
onPointerDown: function onPointerDown(e) {
|
|
182312
|
+
e.stopPropagation();
|
|
182313
|
+
e.preventDefault();
|
|
182314
|
+
}
|
|
182302
182315
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
182303
182316
|
className: "action_preview",
|
|
182304
182317
|
onClick: handlePreview
|
|
@@ -182307,7 +182320,7 @@
|
|
|
182307
182320
|
style: {
|
|
182308
182321
|
fontSize: resetSize.fontSize
|
|
182309
182322
|
}
|
|
182310
|
-
})), !readOnly && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
182323
|
+
})), !readOnly && !disabled && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
182311
182324
|
className: "action_delete",
|
|
182312
182325
|
onClick: function onClick() {
|
|
182313
182326
|
return remove(file);
|
|
@@ -182344,6 +182357,7 @@
|
|
|
182344
182357
|
itemRender = instance.itemRender,
|
|
182345
182358
|
listType = instance.listType,
|
|
182346
182359
|
showUploadList = instance.showUploadList,
|
|
182360
|
+
disabled = instance.disabled,
|
|
182347
182361
|
enableDrag = instance.enableDrag,
|
|
182348
182362
|
fileNames = instance.fileNames,
|
|
182349
182363
|
move = instance.move;
|
|
@@ -182379,7 +182393,7 @@
|
|
|
182379
182393
|
}
|
|
182380
182394
|
};
|
|
182381
182395
|
|
|
182382
|
-
if (enableDrag) {
|
|
182396
|
+
if (!disabled && enableDrag) {
|
|
182383
182397
|
return /*#__PURE__*/React__default['default'].createElement(LmDrag$1, {
|
|
182384
182398
|
options: fileList,
|
|
182385
182399
|
rowKey: uid,
|
|
@@ -287110,13 +287124,19 @@
|
|
|
287110
287124
|
var selectedRows = useSelectedRows.selectedRows;
|
|
287111
287125
|
|
|
287112
287126
|
if (tableRowType === 'select' || tableRowType === 'default' && selectedRows.length) {
|
|
287113
|
-
|
|
287114
|
-
|
|
287115
|
-
|
|
287116
|
-
|
|
287117
|
-
|
|
287118
|
-
selectedRows:
|
|
287119
|
-
|
|
287127
|
+
if ((rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.type) === 'radio') {
|
|
287128
|
+
setSelectedRows({
|
|
287129
|
+
selectedRows: [lodash.isObject(selectedRows[0]) || !selectedRows.length ? record : record[rowKey]]
|
|
287130
|
+
});
|
|
287131
|
+
} else {
|
|
287132
|
+
var selectIndex = selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.findIndex(function (v) {
|
|
287133
|
+
return lodash.isObject(v) ? v[rowKey] === record[rowKey] : v === record[rowKey];
|
|
287134
|
+
});
|
|
287135
|
+
selectIndex >= 0 ? selectedRows.splice(selectIndex, 1) : selectedRows.push(lodash.isObject(selectedRows[0]) || !selectedRows.length ? record : record[rowKey]);
|
|
287136
|
+
setSelectedRows({
|
|
287137
|
+
selectedRows: lodash.cloneDeep(selectedRows)
|
|
287138
|
+
});
|
|
287139
|
+
}
|
|
287120
287140
|
}
|
|
287121
287141
|
} else {
|
|
287122
287142
|
rowClick === null || rowClick === void 0 ? void 0 : rowClick(record);
|
|
@@ -287200,7 +287220,7 @@
|
|
|
287200
287220
|
}); // rowClick?.(reulstSelect)
|
|
287201
287221
|
} : undefined,
|
|
287202
287222
|
onSelect: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) ? function (record, selected) {
|
|
287203
|
-
var reulstSelect = selected ? lodash.uniqBy([].concat(_toConsumableArray$1(rowSelection.selectedRows), [record]), rowKey) : rowSelection.selectedRows.filter(function (item) {
|
|
287223
|
+
var reulstSelect = rowSelection.type === 'radio' ? [record] : selected ? lodash.uniqBy([].concat(_toConsumableArray$1(rowSelection.selectedRows), [record]), rowKey) : rowSelection.selectedRows.filter(function (item) {
|
|
287204
287224
|
return item[rowKey] !== record[rowKey];
|
|
287205
287225
|
});
|
|
287206
287226
|
setSelectedRows({
|
|
@@ -312883,21 +312903,46 @@
|
|
|
312883
312903
|
var SortableItem$2 = /*#__PURE__*/React.memo(SortableItem$1);
|
|
312884
312904
|
|
|
312885
312905
|
var _excluded$2S = ["children"];
|
|
312906
|
+
// children: React.ReactNode
|
|
312907
|
+
// }
|
|
312908
|
+
// interface ItemInstance {}
|
|
312909
|
+
// @ts-ignore
|
|
312910
|
+
|
|
312886
312911
|
var Item$5 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
312887
312912
|
var children = _ref.children,
|
|
312888
312913
|
props = _objectWithoutProperties$1(_ref, _excluded$2S);
|
|
312889
312914
|
|
|
312890
|
-
|
|
312891
|
-
|
|
312892
|
-
|
|
312893
|
-
|
|
312894
|
-
//
|
|
312895
|
-
//
|
|
312896
|
-
//
|
|
312915
|
+
// const rProps = omit({ ...props, ...children.props }, [
|
|
312916
|
+
// 'isSticky',
|
|
312917
|
+
// 'colStart',
|
|
312918
|
+
// 'colEnd',
|
|
312919
|
+
// 'prefixCls',
|
|
312920
|
+
// 'fixLeft',
|
|
312921
|
+
// 'fixRight',
|
|
312922
|
+
// 'lastFixLeft',
|
|
312923
|
+
// 'firstFixRight',
|
|
312924
|
+
// 'lastFixRight',
|
|
312925
|
+
// 'firstFixLeft',
|
|
312926
|
+
// 'isSticky',
|
|
312927
|
+
// 'additionalProps',
|
|
312928
|
+
// 'rowType',
|
|
312929
|
+
// ])
|
|
312930
|
+
return (
|
|
312931
|
+
/*#__PURE__*/
|
|
312932
|
+
// <th {...rProps} ref={ref as any} />
|
|
312933
|
+
React__default['default'].createElement("th", _objectSpread(_objectSpread(_objectSpread({}, props), children.props), {}, {
|
|
312934
|
+
ref: ref
|
|
312935
|
+
})) // <th {...props} ref={ref as any}>
|
|
312936
|
+
// {(children as any)?.props?.children || children}
|
|
312937
|
+
// </th>
|
|
312938
|
+
|
|
312939
|
+
);
|
|
312897
312940
|
});
|
|
312898
312941
|
function SortableItem$3(props) {
|
|
312942
|
+
var id = props.id;
|
|
312943
|
+
|
|
312899
312944
|
var _useSortable = useSortable({
|
|
312900
|
-
id:
|
|
312945
|
+
id: id
|
|
312901
312946
|
}),
|
|
312902
312947
|
attributes = _useSortable.attributes,
|
|
312903
312948
|
listeners = _useSortable.listeners,
|
|
@@ -313003,7 +313048,7 @@
|
|
|
313003
313048
|
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'] : '';
|
|
313004
313049
|
}
|
|
313005
313050
|
function checkMemoShouldUploadSpecialFun(prev, next) {
|
|
313006
|
-
var _prevCol$componentPro, _nextCol$componentPro, _prevCol$componentPro2, _nextCol$componentPro2, _prevCol$componentPro3, _nextCol$componentPro3, _prevCol$componentPro4, _nextCol$componentPro4;
|
|
313051
|
+
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, _prevCol$componentPro7, _nextCol$componentPro7;
|
|
313007
313052
|
|
|
313008
313053
|
var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
|
|
313009
313054
|
|
|
@@ -313017,9 +313062,14 @@
|
|
|
313017
313062
|
|
|
313018
313063
|
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.render) || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.render)) && !lodash.isEqual(lodash.pick(prev, ['colIndex', 'record', 'children']), lodash.pick(next, ['colIndex', 'record', 'children']))) {
|
|
313019
313064
|
return false;
|
|
313065
|
+
} // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
|
|
313066
|
+
|
|
313067
|
+
|
|
313068
|
+
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.editable) === 'render' || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.editable) === 'render') && ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro = prevCol.componentProps) === null || _prevCol$componentPro === void 0 ? void 0 : _prevCol$componentPro.render) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro = nextCol.componentProps) === null || _nextCol$componentPro === void 0 ? void 0 : _nextCol$componentPro.render)) && !lodash.isEqual(lodash.omit(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, ['render']), lodash.omit(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps, ['render']))) {
|
|
313069
|
+
return false;
|
|
313020
313070
|
}
|
|
313021
313071
|
|
|
313022
|
-
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.editable) === 'render' || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.editable) === 'render') && ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$
|
|
313072
|
+
if (((prevCol === null || prevCol === void 0 ? void 0 : prevCol.editable) === 'render' || (nextCol === null || nextCol === void 0 ? void 0 : nextCol.editable) === 'render') && ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro2 = prevCol.componentProps) === null || _prevCol$componentPro2 === void 0 ? void 0 : _prevCol$componentPro2.render) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro2 = nextCol.componentProps) === null || _nextCol$componentPro2 === void 0 ? void 0 : _nextCol$componentPro2.render)) && !lodash.isEqual(lodash.pick(prev, ['colIndex', 'record', 'rowIndex']), lodash.pick(next, ['colIndex', 'record', 'rowIndex']))) {
|
|
313023
313073
|
return false;
|
|
313024
313074
|
}
|
|
313025
313075
|
|
|
@@ -313027,8 +313077,15 @@
|
|
|
313027
313077
|
return false;
|
|
313028
313078
|
}
|
|
313029
313079
|
|
|
313030
|
-
if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$
|
|
313031
|
-
|
|
313080
|
+
if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro3 = prevCol.componentProps) === null || _prevCol$componentPro3 === void 0 ? void 0 : _prevCol$componentPro3.optionOnly) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro3 = nextCol.componentProps) === null || _nextCol$componentPro3 === void 0 ? void 0 : _nextCol$componentPro3.optionOnly)) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro4 = prevCol.componentProps) === null || _prevCol$componentPro4 === void 0 ? void 0 : _prevCol$componentPro4.options, nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro4 = nextCol.componentProps) === null || _nextCol$componentPro4 === void 0 ? void 0 : _nextCol$componentPro4.options)) {
|
|
313081
|
+
return false;
|
|
313082
|
+
}
|
|
313083
|
+
|
|
313084
|
+
if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro5 = prevCol.componentProps) === null || _prevCol$componentPro5 === void 0 ? void 0 : _prevCol$componentPro5.options) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro5 = nextCol.componentProps) === null || _nextCol$componentPro5 === void 0 ? void 0 : _nextCol$componentPro5.options)) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro6 = prevCol.componentProps) === null || _prevCol$componentPro6 === void 0 ? void 0 : _prevCol$componentPro6.options, nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro6 = nextCol.componentProps) === null || _nextCol$componentPro6 === void 0 ? void 0 : _nextCol$componentPro6.options)) {
|
|
313085
|
+
return false;
|
|
313086
|
+
}
|
|
313087
|
+
|
|
313088
|
+
if ((lodash.isFunction(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps) || lodash.isFunction(nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) && !lodash.isEqual(prevCol.newOptions, nextCol.newOptions) && !lodash.isEqual(prevCol === null || prevCol === void 0 ? void 0 : prevCol.componentProps, nextCol === null || nextCol === void 0 ? void 0 : nextCol.componentProps)) {
|
|
313032
313089
|
return false;
|
|
313033
313090
|
}
|
|
313034
313091
|
|
|
@@ -313037,6 +313094,10 @@
|
|
|
313037
313094
|
return false;
|
|
313038
313095
|
}
|
|
313039
313096
|
|
|
313097
|
+
if (next.className.indexOf('drag-visible') > -1) {
|
|
313098
|
+
return lodash.isEqual(prev.style, next.style);
|
|
313099
|
+
}
|
|
313100
|
+
|
|
313040
313101
|
if (next.className.indexOf('ant-table-selection-column') > -1) {
|
|
313041
313102
|
var _prev$children, _prev$children$, _next$children, _next$children$;
|
|
313042
313103
|
|
|
@@ -313045,7 +313106,7 @@
|
|
|
313045
313106
|
/** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
|
|
313046
313107
|
|
|
313047
313108
|
|
|
313048
|
-
if ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$
|
|
313109
|
+
if ((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$componentPro7 = prevCol.componentProps) === null || _prevCol$componentPro7 === void 0 ? void 0 : _prevCol$componentPro7.quickcopy) || (nextCol === null || nextCol === void 0 ? void 0 : (_nextCol$componentPro7 = nextCol.componentProps) === null || _nextCol$componentPro7 === void 0 ? void 0 : _nextCol$componentPro7.quickcopy)) {
|
|
313049
313110
|
var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
|
|
313050
313111
|
var p = lodash.pick(prev, pickProps);
|
|
313051
313112
|
var n = lodash.pick(next, pickProps);
|
|
@@ -313481,7 +313542,16 @@
|
|
|
313481
313542
|
};
|
|
313482
313543
|
|
|
313483
313544
|
var Control = function Control(con) {
|
|
313545
|
+
var _col$newOptions;
|
|
313546
|
+
|
|
313484
313547
|
var resultComponentProps = lodash.isFunction(componentProps) ? componentProps === null || componentProps === void 0 ? void 0 : componentProps(record, col) : componentProps;
|
|
313548
|
+
|
|
313549
|
+
if (lodash.isFunction(componentProps) && (col === null || col === void 0 ? void 0 : (_col$newOptions = col.newOptions) === null || _col$newOptions === void 0 ? void 0 : _col$newOptions.length)) {
|
|
313550
|
+
resultComponentProps = _objectSpread(_objectSpread({}, resultComponentProps), {}, {
|
|
313551
|
+
options: col === null || col === void 0 ? void 0 : col.newOptions
|
|
313552
|
+
});
|
|
313553
|
+
}
|
|
313554
|
+
|
|
313485
313555
|
var clearAttrComponentProps = lodash.omit(resultComponentProps, ['optionOnly', 'isOnlyValue', 'quickcopy']);
|
|
313486
313556
|
|
|
313487
313557
|
switch (con) {
|
|
@@ -313609,7 +313679,8 @@
|
|
|
313609
313679
|
|
|
313610
313680
|
case 'render':
|
|
313611
313681
|
{
|
|
313612
|
-
var
|
|
313682
|
+
var _resultComponentProps = resultComponentProps,
|
|
313683
|
+
render = _resultComponentProps.render;
|
|
313613
313684
|
var fromData = form.getFieldsValue();
|
|
313614
313685
|
return render === null || render === void 0 ? void 0 : render(_objectSpread(_objectSpread({}, !isObjEmpty(fromData) ? _objectSpread(_objectSpread({}, record), {}, _defineProperty$1({}, dataIndex, fromData[dataIndex])) : record), {}, {
|
|
313615
313686
|
onChange: save
|
|
@@ -313648,7 +313719,8 @@
|
|
|
313648
313719
|
valuePropName: editable === 'switch' ? 'checked' : 'value',
|
|
313649
313720
|
style: {
|
|
313650
313721
|
margin: 0
|
|
313651
|
-
}
|
|
313722
|
+
},
|
|
313723
|
+
noStyle: formProps ? false : true
|
|
313652
313724
|
}, formProps), {}, {
|
|
313653
313725
|
name: dataIndex
|
|
313654
313726
|
}), Control(editable)));
|
|
@@ -313660,6 +313732,7 @@
|
|
|
313660
313732
|
margin: 0
|
|
313661
313733
|
}
|
|
313662
313734
|
}, formProps), {}, {
|
|
313735
|
+
noStyle: formProps ? false : true,
|
|
313663
313736
|
name: [dataIndex, 'value']
|
|
313664
313737
|
}), Control(editable)));
|
|
313665
313738
|
}
|
|
@@ -313718,7 +313791,7 @@
|
|
|
313718
313791
|
var MemoEditableCell = /*#__PURE__*/React.memo(EditableCell$1, function (prev, next) {
|
|
313719
313792
|
var pickProps = ['record', 'colIndex'];
|
|
313720
313793
|
var p = lodash.pick(prev, pickProps);
|
|
313721
|
-
var n = lodash.pick(next, pickProps); // console.log(
|
|
313794
|
+
var n = lodash.pick(next, pickProps); // console.log('333', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
|
|
313722
313795
|
|
|
313723
313796
|
/** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
|
|
313724
313797
|
|
|
@@ -313829,7 +313902,7 @@
|
|
|
313829
313902
|
/** 点击添加按钮添加 */
|
|
313830
313903
|
|
|
313831
313904
|
|
|
313832
|
-
var handleAdd = function
|
|
313905
|
+
var handleAdd = lodash.debounce(function (row) {
|
|
313833
313906
|
var _recordCreatorProps$i;
|
|
313834
313907
|
|
|
313835
313908
|
var addDataInfo = lodash.isFunction(recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData) ? recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : (_recordCreatorProps$i = recordCreatorProps.initData) === null || _recordCreatorProps$i === void 0 ? void 0 : _recordCreatorProps$i.call(recordCreatorProps) : recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData;
|
|
@@ -313837,7 +313910,7 @@
|
|
|
313837
313910
|
draft.push(_objectSpread(_defineProperty$1({}, _rowKey, "".concat(Date.now())), addDataInfo || {}));
|
|
313838
313911
|
});
|
|
313839
313912
|
setDataSource(res); // onChange?.(res)
|
|
313840
|
-
};
|
|
313913
|
+
}, 40);
|
|
313841
313914
|
/** 本地缓存一个选择数据 */
|
|
313842
313915
|
// useEffect(() => {
|
|
313843
313916
|
// if (rowSelection) {
|
|
@@ -313852,7 +313925,6 @@
|
|
|
313852
313925
|
// ;(rowSelection?.onChange as any)?.(selectRows)
|
|
313853
313926
|
// }
|
|
313854
313927
|
|
|
313855
|
-
|
|
313856
313928
|
var handleSave = function handleSave(row, options) {
|
|
313857
313929
|
var _deepDataSourceRef$cu, _deepDataSourceRef$cu2;
|
|
313858
313930
|
|
|
@@ -313939,7 +314011,7 @@
|
|
|
313939
314011
|
}; // @ts-ignore
|
|
313940
314012
|
|
|
313941
314013
|
|
|
313942
|
-
var handleTableRowDelete = function
|
|
314014
|
+
var handleTableRowDelete = lodash.debounce(function (key) {
|
|
313943
314015
|
var _deepDataSourceRef$cu3, _deepDataSourceRef$cu4;
|
|
313944
314016
|
|
|
313945
314017
|
var rkey = lodash.isObject(key) ? key[_rowKey] : key;
|
|
@@ -313985,33 +314057,70 @@
|
|
|
313985
314057
|
|
|
313986
314058
|
setDataSource(_res);
|
|
313987
314059
|
}
|
|
313988
|
-
};
|
|
313989
|
-
|
|
314060
|
+
}, 40);
|
|
314061
|
+
var handleTableRowReplace = lodash.debounce(function (record, defaultRecord) {
|
|
314062
|
+
var _deepDataSourceRef$cu5, _deepDataSourceRef$cu6;
|
|
314063
|
+
|
|
314064
|
+
var rkey = lodash.isObject(record) ? record[_rowKey] : record;
|
|
314065
|
+
var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu5 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu5 === void 0 ? void 0 : (_deepDataSourceRef$cu6 = _deepDataSourceRef$cu5[rkey]) === null || _deepDataSourceRef$cu6 === void 0 ? void 0 : _deepDataSourceRef$cu6.preKeys; // const res = cloneDeep(dataSourceRef.current)
|
|
314066
|
+
|
|
314067
|
+
var deep = function deep(children) {
|
|
314068
|
+
return children.map(function (item) {
|
|
314069
|
+
if (item[_rowKey] === rkey) {
|
|
314070
|
+
return defaultRecord;
|
|
314071
|
+
} else if (preKeys.includes(item[_rowKey]) && item.children) {
|
|
314072
|
+
var child = deep(item.children);
|
|
314073
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
314074
|
+
children: child
|
|
314075
|
+
});
|
|
314076
|
+
} else {
|
|
314077
|
+
return item;
|
|
314078
|
+
}
|
|
314079
|
+
});
|
|
314080
|
+
};
|
|
313990
314081
|
|
|
314082
|
+
var res = deep(dataSourceRef.current);
|
|
314083
|
+
setDataSource(res);
|
|
314084
|
+
}, 40);
|
|
314085
|
+
/** 快捷添加 */
|
|
313991
314086
|
|
|
313992
|
-
var handleTableRowAdd = function
|
|
313993
|
-
var _deepDataSourceRef$
|
|
314087
|
+
var handleTableRowAdd = lodash.debounce(function (record, isAppendInChindren, defaultRecord) {
|
|
314088
|
+
var _deepDataSourceRef$cu7, _deepDataSourceRef$cu8;
|
|
313994
314089
|
|
|
313995
314090
|
var rkey = lodash.isObject(record) ? record[_rowKey] : record;
|
|
313996
|
-
var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$
|
|
314091
|
+
var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$cu7 = deepDataSourceRef.current) === null || _deepDataSourceRef$cu7 === void 0 ? void 0 : (_deepDataSourceRef$cu8 = _deepDataSourceRef$cu7[rkey]) === null || _deepDataSourceRef$cu8 === void 0 ? void 0 : _deepDataSourceRef$cu8.preKeys;
|
|
313997
314092
|
var res = fn(dataSourceRef.current, function (draft) {
|
|
313998
|
-
if (preKeys.length > 1) {
|
|
314093
|
+
if ((preKeys === null || preKeys === void 0 ? void 0 : preKeys.length) > 1) {
|
|
313999
314094
|
var deeps = function deeps(children) {
|
|
314000
314095
|
children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
|
|
314001
314096
|
if (preKeys === null || preKeys === void 0 ? void 0 : preKeys.includes(item[_rowKey])) {
|
|
314002
314097
|
if (item[_rowKey] === rkey) {
|
|
314003
314098
|
if (isAppendInChindren) {
|
|
314004
314099
|
if (item === null || item === void 0 ? void 0 : item.children) {
|
|
314005
|
-
|
|
314100
|
+
if (Array.isArray(defaultRecord)) {
|
|
314101
|
+
var _item$children;
|
|
314102
|
+
|
|
314103
|
+
item === null || item === void 0 ? void 0 : (_item$children = item.children) === null || _item$children === void 0 ? void 0 : _item$children.push.apply(_item$children, _toConsumableArray$1(defaultRecord));
|
|
314104
|
+
} else {
|
|
314105
|
+
var _item$children2;
|
|
314006
314106
|
|
|
314007
|
-
|
|
314107
|
+
item === null || item === void 0 ? void 0 : (_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.push(defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
314108
|
+
}
|
|
314008
314109
|
} else {
|
|
314009
|
-
|
|
314110
|
+
if (Array.isArray(defaultRecord)) {
|
|
314111
|
+
item.children = _toConsumableArray$1(defaultRecord);
|
|
314112
|
+
} else {
|
|
314113
|
+
item.children = [defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now()))];
|
|
314114
|
+
}
|
|
314010
314115
|
}
|
|
314011
314116
|
|
|
314012
314117
|
!expandedRowKeys.includes(item[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray$1(expandedRowKeys), [item[_rowKey]]));
|
|
314013
314118
|
} else {
|
|
314014
|
-
|
|
314119
|
+
if (Array.isArray(defaultRecord)) {
|
|
314120
|
+
children.splice.apply(children, [index + 1, 0].concat(_toConsumableArray$1(defaultRecord)));
|
|
314121
|
+
} else {
|
|
314122
|
+
children.splice(index + 1, 0, defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
314123
|
+
}
|
|
314015
314124
|
}
|
|
314016
314125
|
} else if (item.children) {
|
|
314017
314126
|
deeps(item.children);
|
|
@@ -314031,23 +314140,32 @@
|
|
|
314031
314140
|
var _draft$index$children, _draft$index, _draft$index2;
|
|
314032
314141
|
|
|
314033
314142
|
if ((_draft$index$children = draft[index].children) === null || _draft$index$children === void 0 ? void 0 : _draft$index$children.length) {
|
|
314034
|
-
|
|
314143
|
+
if (Array.isArray(defaultRecord)) {
|
|
314144
|
+
var _draft$index$children2;
|
|
314035
314145
|
|
|
314036
|
-
|
|
314146
|
+
(_draft$index$children2 = draft[index].children) === null || _draft$index$children2 === void 0 ? void 0 : _draft$index$children2.push.apply(_draft$index$children2, _toConsumableArray$1(defaultRecord));
|
|
314147
|
+
} else {
|
|
314148
|
+
var _draft$index$children3;
|
|
314149
|
+
|
|
314150
|
+
(_draft$index$children3 = draft[index].children) === null || _draft$index$children3 === void 0 ? void 0 : _draft$index$children3.push(defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
314151
|
+
}
|
|
314037
314152
|
} else {
|
|
314038
|
-
draft[index].children = [_defineProperty$1({}, _rowKey, "".concat(Date.now()))];
|
|
314153
|
+
draft[index].children = Array.isArray(defaultRecord) ? _toConsumableArray$1(defaultRecord) : [defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now()))];
|
|
314039
314154
|
}
|
|
314040
314155
|
|
|
314041
314156
|
!expandedRowKeys.includes((_draft$index = draft[index]) === null || _draft$index === void 0 ? void 0 : _draft$index[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray$1(expandedRowKeys), [(_draft$index2 = draft[index]) === null || _draft$index2 === void 0 ? void 0 : _draft$index2[_rowKey]]));
|
|
314042
314157
|
} else {
|
|
314043
|
-
|
|
314158
|
+
if (Array.isArray(defaultRecord)) {
|
|
314159
|
+
draft.splice.apply(draft, [index + 1, 0].concat(_toConsumableArray$1(defaultRecord)));
|
|
314160
|
+
} else {
|
|
314161
|
+
draft.splice(index + 1, 0, defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
314162
|
+
}
|
|
314044
314163
|
}
|
|
314045
314164
|
}
|
|
314046
314165
|
}
|
|
314047
314166
|
});
|
|
314048
|
-
console.log(preKeys, '--preKeys', res);
|
|
314049
314167
|
setDataSource(res);
|
|
314050
|
-
};
|
|
314168
|
+
}, 40);
|
|
314051
314169
|
|
|
314052
314170
|
var handleCopy = function handleCopy(key, value, type, rowIndex) {
|
|
314053
314171
|
var res = fn(dataSourceRef.current, function (draft) {
|
|
@@ -314066,8 +314184,9 @@
|
|
|
314066
314184
|
var hasOnlyOptionsDatas = columns.filter(function (item) {
|
|
314067
314185
|
var _item$componentProps;
|
|
314068
314186
|
|
|
314069
|
-
|
|
314070
|
-
|
|
314187
|
+
var resultComponentProps = lodash.isFunction(item === null || item === void 0 ? void 0 : item.componentProps) ? item === null || item === void 0 ? void 0 : (_item$componentProps = item.componentProps) === null || _item$componentProps === void 0 ? void 0 : _item$componentProps.call(item, {}, item) : item === null || item === void 0 ? void 0 : item.componentProps;
|
|
314188
|
+
return resultComponentProps === null || resultComponentProps === void 0 ? void 0 : resultComponentProps.optionOnly;
|
|
314189
|
+
}); // const hasOnlyOptionsDatas = columns.filter((item) => item?.componentProps?.optionOnly)
|
|
314071
314190
|
|
|
314072
314191
|
if (hasOnlyOptionsDatas.length) {
|
|
314073
314192
|
return hasOnlyOptionsDatas === null || hasOnlyOptionsDatas === void 0 ? void 0 : hasOnlyOptionsDatas.map(function (item) {
|
|
@@ -314081,9 +314200,13 @@
|
|
|
314081
314200
|
|
|
314082
314201
|
var DisableOptions = React.useMemo(function () {
|
|
314083
314202
|
var newColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (item) {
|
|
314084
|
-
var
|
|
314085
|
-
|
|
314086
|
-
|
|
314203
|
+
var _item$componentProps2;
|
|
314204
|
+
|
|
314205
|
+
var resultComponentProps = lodash.isFunction(item.componentProps) ? (_item$componentProps2 = item.componentProps) === null || _item$componentProps2 === void 0 ? void 0 : _item$componentProps2.call(item, {}, item) : item.componentProps;
|
|
314206
|
+
|
|
314207
|
+
var _ref12 = resultComponentProps || {},
|
|
314208
|
+
optionOnly = _ref12.optionOnly,
|
|
314209
|
+
options = _ref12.options;
|
|
314087
314210
|
|
|
314088
314211
|
if (optionOnly && options) {
|
|
314089
314212
|
var dataIndex = item.dataIndex;
|
|
@@ -314095,6 +314218,13 @@
|
|
|
314095
314218
|
disabled: !!dataIndexData.includes(o === null || o === void 0 ? void 0 : o.value)
|
|
314096
314219
|
});
|
|
314097
314220
|
});
|
|
314221
|
+
|
|
314222
|
+
if (lodash.isFunction(item.componentProps)) {
|
|
314223
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
314224
|
+
newOptions: newOptions
|
|
314225
|
+
});
|
|
314226
|
+
}
|
|
314227
|
+
|
|
314098
314228
|
return _objectSpread(_objectSpread({}, item), {}, {
|
|
314099
314229
|
componentProps: _objectSpread(_objectSpread({}, item.componentProps), {}, {
|
|
314100
314230
|
options: newOptions
|
|
@@ -314124,7 +314254,7 @@
|
|
|
314124
314254
|
fixed: 'left',
|
|
314125
314255
|
render: function render(_, record) {
|
|
314126
314256
|
return /*#__PURE__*/React__default['default'].createElement(Dragger$1, {
|
|
314127
|
-
id: record[_rowKey] || record.id
|
|
314257
|
+
id: record[_rowKey] || (record === null || record === void 0 ? void 0 : record.id)
|
|
314128
314258
|
});
|
|
314129
314259
|
}
|
|
314130
314260
|
} : null, indexCol ? lodash.isBoolean(indexCol) ? {
|
|
@@ -314250,10 +314380,10 @@
|
|
|
314250
314380
|
setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
|
|
314251
314381
|
};
|
|
314252
314382
|
|
|
314253
|
-
var colDraggableContainer = React.useCallback(function (
|
|
314383
|
+
var colDraggableContainer = React.useCallback(function (_ref13) {
|
|
314254
314384
|
var _React$Children;
|
|
314255
314385
|
|
|
314256
|
-
var props = _extends$2({},
|
|
314386
|
+
var props = _extends$2({}, _ref13);
|
|
314257
314387
|
|
|
314258
314388
|
return /*#__PURE__*/React__default['default'].createElement("tr", null, (_React$Children = React__default['default'].Children) === null || _React$Children === void 0 ? void 0 : _React$Children.map(props.children, function (child) {
|
|
314259
314389
|
var _child$props, _child$props$column;
|
|
@@ -314276,8 +314406,8 @@
|
|
|
314276
314406
|
deleteRowData: function deleteRowData(data) {
|
|
314277
314407
|
return handleTableRowDelete(data);
|
|
314278
314408
|
},
|
|
314279
|
-
addRowData: function addRowData(data,
|
|
314280
|
-
return handleTableRowAdd(data,
|
|
314409
|
+
addRowData: function addRowData(data, defaultValue, addInChild) {
|
|
314410
|
+
return addInChild === 'replace' ? handleTableRowReplace(data, defaultValue) : handleTableRowAdd(data, addInChild, defaultValue);
|
|
314281
314411
|
},
|
|
314282
314412
|
clearSelect: function clearSelect() {
|
|
314283
314413
|
setLocalRowSelectList({
|
|
@@ -317502,7 +317632,8 @@
|
|
|
317502
317632
|
className: 'lm_tree_select',
|
|
317503
317633
|
value: resetValue,
|
|
317504
317634
|
size: mergeSize,
|
|
317505
|
-
disabled: mergedDisabled
|
|
317635
|
+
disabled: mergedDisabled,
|
|
317636
|
+
treeData: treeData
|
|
317506
317637
|
}, resetProps), children);
|
|
317507
317638
|
});
|
|
317508
317639
|
var LMTreeSelect = CLMTreeSelect;
|