linkmore-design 1.1.13-alpha.6 → 1.1.13-alpha.9
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 +87 -34
- 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 +43 -17
- package/es/LmEditTable/style/index.css +6 -0
- package/es/LmEditTable/style/variables.css +6 -0
- package/es/LmEditTable/util.js +7 -2
- 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 +42 -16
- package/lib/LmEditTable/style/index.css +6 -0
- package/lib/LmEditTable/style/variables.css +6 -0
- package/lib/LmEditTable/util.js +6 -1
- 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>, defaultValue?: Record<string, any> | Record<string, any>[], addInChild?: boolean) => void;
|
|
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({
|
|
@@ -313044,7 +313064,12 @@
|
|
|
313044
313064
|
return false;
|
|
313045
313065
|
}
|
|
313046
313066
|
|
|
313047
|
-
if (
|
|
313067
|
+
if (prev.isEdit !== next.isEdit) {
|
|
313068
|
+
return false;
|
|
313069
|
+
} // console.log(22, prevCol?.editable === 'render', nextCol?.editable === 'render', prevCol?.componentProps, prevCol?.componentProps)
|
|
313070
|
+
|
|
313071
|
+
|
|
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$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'])) || !lodash.isEqual(lodash.pick(prev, ['colIndex', 'record', 'rowIndex']), lodash.pick(next, ['colIndex', 'record', 'rowIndex'])))) {
|
|
313048
313073
|
return false;
|
|
313049
313074
|
}
|
|
313050
313075
|
|
|
@@ -313694,7 +313719,8 @@
|
|
|
313694
313719
|
valuePropName: editable === 'switch' ? 'checked' : 'value',
|
|
313695
313720
|
style: {
|
|
313696
313721
|
margin: 0
|
|
313697
|
-
}
|
|
313722
|
+
},
|
|
313723
|
+
noStyle: formProps ? false : true
|
|
313698
313724
|
}, formProps), {}, {
|
|
313699
313725
|
name: dataIndex
|
|
313700
313726
|
}), Control(editable)));
|
|
@@ -313706,6 +313732,7 @@
|
|
|
313706
313732
|
margin: 0
|
|
313707
313733
|
}
|
|
313708
313734
|
}, formProps), {}, {
|
|
313735
|
+
noStyle: formProps ? false : true,
|
|
313709
313736
|
name: [dataIndex, 'value']
|
|
313710
313737
|
}), Control(editable)));
|
|
313711
313738
|
}
|
|
@@ -313718,7 +313745,7 @@
|
|
|
313718
313745
|
}
|
|
313719
313746
|
|
|
313720
313747
|
return childNode;
|
|
313721
|
-
}, [col, isEdit, editing, getLength]); // 出现死循环找我
|
|
313748
|
+
}, [col, isEdit, editing, getLength, record]); // 出现死循环找我
|
|
313722
313749
|
|
|
313723
313750
|
React.useEffect(function () {
|
|
313724
313751
|
var editable = col.editable,
|
|
@@ -313765,10 +313792,14 @@
|
|
|
313765
313792
|
var pickProps = ['record', 'colIndex'];
|
|
313766
313793
|
var p = lodash.pick(prev, pickProps);
|
|
313767
313794
|
var n = lodash.pick(next, pickProps);
|
|
313768
|
-
|
|
313795
|
+
|
|
313796
|
+
if (next === null || next === void 0 ? void 0 : next.shouldUpdate) {
|
|
313797
|
+
return false;
|
|
313798
|
+
} // console.log('333', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
|
|
313769
313799
|
|
|
313770
313800
|
/** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
|
|
313771
313801
|
|
|
313802
|
+
|
|
313772
313803
|
if (!checkMemoShouldUploadSpecialFun(prev, next)) {
|
|
313773
313804
|
return false;
|
|
313774
313805
|
}
|
|
@@ -313803,6 +313834,7 @@
|
|
|
313803
313834
|
size = _props$size === void 0 ? 'small' : _props$size,
|
|
313804
313835
|
recordCreatorProps = props.recordCreatorProps,
|
|
313805
313836
|
_props$shouldUpdate = props.shouldUpdate,
|
|
313837
|
+
shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
|
|
313806
313838
|
resetProps = _objectWithoutProperties$1(props, _excluded6); // const [dataSource, setDataSource] = useState([]);
|
|
313807
313839
|
|
|
313808
313840
|
|
|
@@ -313876,7 +313908,7 @@
|
|
|
313876
313908
|
/** 点击添加按钮添加 */
|
|
313877
313909
|
|
|
313878
313910
|
|
|
313879
|
-
var handleAdd = function
|
|
313911
|
+
var handleAdd = lodash.debounce(function (row) {
|
|
313880
313912
|
var _recordCreatorProps$i;
|
|
313881
313913
|
|
|
313882
313914
|
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;
|
|
@@ -313884,7 +313916,7 @@
|
|
|
313884
313916
|
draft.push(_objectSpread(_defineProperty$1({}, _rowKey, "".concat(Date.now())), addDataInfo || {}));
|
|
313885
313917
|
});
|
|
313886
313918
|
setDataSource(res); // onChange?.(res)
|
|
313887
|
-
};
|
|
313919
|
+
}, 40);
|
|
313888
313920
|
/** 本地缓存一个选择数据 */
|
|
313889
313921
|
// useEffect(() => {
|
|
313890
313922
|
// if (rowSelection) {
|
|
@@ -313899,7 +313931,6 @@
|
|
|
313899
313931
|
// ;(rowSelection?.onChange as any)?.(selectRows)
|
|
313900
313932
|
// }
|
|
313901
313933
|
|
|
313902
|
-
|
|
313903
313934
|
var handleSave = function handleSave(row, options) {
|
|
313904
313935
|
var _deepDataSourceRef$cu, _deepDataSourceRef$cu2;
|
|
313905
313936
|
|
|
@@ -313986,7 +314017,7 @@
|
|
|
313986
314017
|
}; // @ts-ignore
|
|
313987
314018
|
|
|
313988
314019
|
|
|
313989
|
-
var handleTableRowDelete = function
|
|
314020
|
+
var handleTableRowDelete = lodash.debounce(function (key) {
|
|
313990
314021
|
var _deepDataSourceRef$cu3, _deepDataSourceRef$cu4;
|
|
313991
314022
|
|
|
313992
314023
|
var rkey = lodash.isObject(key) ? key[_rowKey] : key;
|
|
@@ -314032,16 +314063,38 @@
|
|
|
314032
314063
|
|
|
314033
314064
|
setDataSource(_res);
|
|
314034
314065
|
}
|
|
314035
|
-
};
|
|
314036
|
-
|
|
314066
|
+
}, 40);
|
|
314067
|
+
var handleTableRowReplace = lodash.debounce(function (record, defaultRecord) {
|
|
314068
|
+
var _deepDataSourceRef$cu5, _deepDataSourceRef$cu6;
|
|
314069
|
+
|
|
314070
|
+
var rkey = lodash.isObject(record) ? record[_rowKey] : record;
|
|
314071
|
+
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)
|
|
314072
|
+
|
|
314073
|
+
var deep = function deep(children) {
|
|
314074
|
+
return children.map(function (item) {
|
|
314075
|
+
if (item[_rowKey] === rkey) {
|
|
314076
|
+
return defaultRecord;
|
|
314077
|
+
} else if (preKeys.includes(item[_rowKey]) && item.children) {
|
|
314078
|
+
var child = deep(item.children);
|
|
314079
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
314080
|
+
children: child
|
|
314081
|
+
});
|
|
314082
|
+
} else {
|
|
314083
|
+
return item;
|
|
314084
|
+
}
|
|
314085
|
+
});
|
|
314086
|
+
};
|
|
314037
314087
|
|
|
314088
|
+
var res = deep(dataSourceRef.current);
|
|
314089
|
+
setDataSource(res);
|
|
314090
|
+
}, 40);
|
|
314091
|
+
/** 快捷添加 */
|
|
314038
314092
|
|
|
314039
|
-
var handleTableRowAdd = function
|
|
314040
|
-
var _deepDataSourceRef$
|
|
314093
|
+
var handleTableRowAdd = lodash.debounce(function (record, isAppendInChindren, defaultRecord) {
|
|
314094
|
+
var _deepDataSourceRef$cu7, _deepDataSourceRef$cu8;
|
|
314041
314095
|
|
|
314042
314096
|
var rkey = lodash.isObject(record) ? record[_rowKey] : record;
|
|
314043
|
-
var preKeys = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : (_deepDataSourceRef$
|
|
314044
|
-
console.log(record, isAppendInChindren, defaultRecord, '333', preKeys);
|
|
314097
|
+
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;
|
|
314045
314098
|
var res = fn(dataSourceRef.current, function (draft) {
|
|
314046
314099
|
if ((preKeys === null || preKeys === void 0 ? void 0 : preKeys.length) > 1) {
|
|
314047
314100
|
var deeps = function deeps(children) {
|
|
@@ -314109,10 +314162,8 @@
|
|
|
314109
314162
|
!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]]));
|
|
314110
314163
|
} else {
|
|
314111
314164
|
if (Array.isArray(defaultRecord)) {
|
|
314112
|
-
console.log(1);
|
|
314113
314165
|
draft.splice.apply(draft, [index + 1, 0].concat(_toConsumableArray$1(defaultRecord)));
|
|
314114
314166
|
} else {
|
|
314115
|
-
console.log(2);
|
|
314116
314167
|
draft.splice(index + 1, 0, defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
314117
314168
|
}
|
|
314118
314169
|
}
|
|
@@ -314120,7 +314171,7 @@
|
|
|
314120
314171
|
}
|
|
314121
314172
|
});
|
|
314122
314173
|
setDataSource(res);
|
|
314123
|
-
};
|
|
314174
|
+
}, 40);
|
|
314124
314175
|
|
|
314125
314176
|
var handleCopy = function handleCopy(key, value, type, rowIndex) {
|
|
314126
314177
|
var res = fn(dataSourceRef.current, function (draft) {
|
|
@@ -314209,7 +314260,7 @@
|
|
|
314209
314260
|
fixed: 'left',
|
|
314210
314261
|
render: function render(_, record) {
|
|
314211
314262
|
return /*#__PURE__*/React__default['default'].createElement(Dragger$1, {
|
|
314212
|
-
id: record[_rowKey] || (record === null || record === void 0 ? void 0 : record.id)
|
|
314263
|
+
id: (record === null || record === void 0 ? void 0 : record[_rowKey]) || (record === null || record === void 0 ? void 0 : record.id)
|
|
314213
314264
|
});
|
|
314214
314265
|
}
|
|
314215
314266
|
} : null, indexCol ? lodash.isBoolean(indexCol) ? {
|
|
@@ -314294,6 +314345,7 @@
|
|
|
314294
314345
|
editable: col.editable,
|
|
314295
314346
|
dataIndex: col.dataIndex,
|
|
314296
314347
|
itemProps: col.itemProps,
|
|
314348
|
+
shouldUpdate: shouldUpdate,
|
|
314297
314349
|
setValid: setValid,
|
|
314298
314350
|
isEdit: isEdit,
|
|
314299
314351
|
isHoverEdit: isHoverEdit,
|
|
@@ -314362,7 +314414,7 @@
|
|
|
314362
314414
|
return handleTableRowDelete(data);
|
|
314363
314415
|
},
|
|
314364
314416
|
addRowData: function addRowData(data, defaultValue, addInChild) {
|
|
314365
|
-
return handleTableRowAdd(data, addInChild, defaultValue);
|
|
314417
|
+
return addInChild === 'replace' ? handleTableRowReplace(data, defaultValue) : handleTableRowAdd(data, addInChild, defaultValue);
|
|
314366
314418
|
},
|
|
314367
314419
|
clearSelect: function clearSelect() {
|
|
314368
314420
|
setLocalRowSelectList({
|
|
@@ -317587,7 +317639,8 @@
|
|
|
317587
317639
|
className: 'lm_tree_select',
|
|
317588
317640
|
value: resetValue,
|
|
317589
317641
|
size: mergeSize,
|
|
317590
|
-
disabled: mergedDisabled
|
|
317642
|
+
disabled: mergedDisabled,
|
|
317643
|
+
treeData: treeData
|
|
317591
317644
|
}, resetProps), children);
|
|
317592
317645
|
});
|
|
317593
317646
|
var LMTreeSelect = CLMTreeSelect;
|