linkmore-design 1.1.13-alpha.6 → 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 +83 -37
- 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 +36 -16
- package/es/LmEditTable/style/index.css +6 -0
- package/es/LmEditTable/style/variables.css +6 -0
- package/es/LmEditTable/util.js +12 -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 +35 -15
- package/lib/LmEditTable/style/index.css +6 -0
- package/lib/LmEditTable/style/variables.css +6 -0
- package/lib/LmEditTable/util.js +11 -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>, 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({
|
|
@@ -313028,7 +313048,7 @@
|
|
|
313028
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'] : '';
|
|
313029
313049
|
}
|
|
313030
313050
|
function checkMemoShouldUploadSpecialFun(prev, next) {
|
|
313031
|
-
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;
|
|
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;
|
|
313032
313052
|
|
|
313033
313053
|
var checkExpandStatus = getExpandStatus(prev.children) === getExpandStatus(next.children);
|
|
313034
313054
|
|
|
@@ -313042,9 +313062,14 @@
|
|
|
313042
313062
|
|
|
313043
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']))) {
|
|
313044
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;
|
|
313045
313070
|
}
|
|
313046
313071
|
|
|
313047
|
-
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']))) {
|
|
313048
313073
|
return false;
|
|
313049
313074
|
}
|
|
313050
313075
|
|
|
@@ -313052,11 +313077,11 @@
|
|
|
313052
313077
|
return false;
|
|
313053
313078
|
}
|
|
313054
313079
|
|
|
313055
|
-
if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$
|
|
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)) {
|
|
313056
313081
|
return false;
|
|
313057
313082
|
}
|
|
313058
313083
|
|
|
313059
|
-
if (((prevCol === null || prevCol === void 0 ? void 0 : (_prevCol$
|
|
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)) {
|
|
313060
313085
|
return false;
|
|
313061
313086
|
}
|
|
313062
313087
|
|
|
@@ -313081,7 +313106,7 @@
|
|
|
313081
313106
|
/** 如果启用了快速复制功能,需要实时判断rowIndex与getLength */
|
|
313082
313107
|
|
|
313083
313108
|
|
|
313084
|
-
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)) {
|
|
313085
313110
|
var pickProps = ['record', 'colIndex', 'rowIndex', 'getLength'];
|
|
313086
313111
|
var p = lodash.pick(prev, pickProps);
|
|
313087
313112
|
var n = lodash.pick(next, pickProps);
|
|
@@ -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
|
}
|
|
@@ -313764,8 +313791,7 @@
|
|
|
313764
313791
|
var MemoEditableCell = /*#__PURE__*/React.memo(EditableCell$1, function (prev, next) {
|
|
313765
313792
|
var pickProps = ['record', 'colIndex'];
|
|
313766
313793
|
var p = lodash.pick(prev, pickProps);
|
|
313767
|
-
var n = lodash.pick(next, pickProps);
|
|
313768
|
-
console.log(prev, next, 222); // console.log(prev, next, '22', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
|
|
313794
|
+
var n = lodash.pick(next, pickProps); // console.log('333', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
|
|
313769
313795
|
|
|
313770
313796
|
/** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
|
|
313771
313797
|
|
|
@@ -313876,7 +313902,7 @@
|
|
|
313876
313902
|
/** 点击添加按钮添加 */
|
|
313877
313903
|
|
|
313878
313904
|
|
|
313879
|
-
var handleAdd = function
|
|
313905
|
+
var handleAdd = lodash.debounce(function (row) {
|
|
313880
313906
|
var _recordCreatorProps$i;
|
|
313881
313907
|
|
|
313882
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;
|
|
@@ -313884,7 +313910,7 @@
|
|
|
313884
313910
|
draft.push(_objectSpread(_defineProperty$1({}, _rowKey, "".concat(Date.now())), addDataInfo || {}));
|
|
313885
313911
|
});
|
|
313886
313912
|
setDataSource(res); // onChange?.(res)
|
|
313887
|
-
};
|
|
313913
|
+
}, 40);
|
|
313888
313914
|
/** 本地缓存一个选择数据 */
|
|
313889
313915
|
// useEffect(() => {
|
|
313890
313916
|
// if (rowSelection) {
|
|
@@ -313899,7 +313925,6 @@
|
|
|
313899
313925
|
// ;(rowSelection?.onChange as any)?.(selectRows)
|
|
313900
313926
|
// }
|
|
313901
313927
|
|
|
313902
|
-
|
|
313903
313928
|
var handleSave = function handleSave(row, options) {
|
|
313904
313929
|
var _deepDataSourceRef$cu, _deepDataSourceRef$cu2;
|
|
313905
313930
|
|
|
@@ -313986,7 +314011,7 @@
|
|
|
313986
314011
|
}; // @ts-ignore
|
|
313987
314012
|
|
|
313988
314013
|
|
|
313989
|
-
var handleTableRowDelete = function
|
|
314014
|
+
var handleTableRowDelete = lodash.debounce(function (key) {
|
|
313990
314015
|
var _deepDataSourceRef$cu3, _deepDataSourceRef$cu4;
|
|
313991
314016
|
|
|
313992
314017
|
var rkey = lodash.isObject(key) ? key[_rowKey] : key;
|
|
@@ -314032,16 +314057,38 @@
|
|
|
314032
314057
|
|
|
314033
314058
|
setDataSource(_res);
|
|
314034
314059
|
}
|
|
314035
|
-
};
|
|
314036
|
-
|
|
314060
|
+
}, 40);
|
|
314061
|
+
var handleTableRowReplace = lodash.debounce(function (record, defaultRecord) {
|
|
314062
|
+
var _deepDataSourceRef$cu5, _deepDataSourceRef$cu6;
|
|
314037
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
|
+
};
|
|
314038
314081
|
|
|
314039
|
-
|
|
314040
|
-
|
|
314082
|
+
var res = deep(dataSourceRef.current);
|
|
314083
|
+
setDataSource(res);
|
|
314084
|
+
}, 40);
|
|
314085
|
+
/** 快捷添加 */
|
|
314086
|
+
|
|
314087
|
+
var handleTableRowAdd = lodash.debounce(function (record, isAppendInChindren, defaultRecord) {
|
|
314088
|
+
var _deepDataSourceRef$cu7, _deepDataSourceRef$cu8;
|
|
314041
314089
|
|
|
314042
314090
|
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);
|
|
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;
|
|
314045
314092
|
var res = fn(dataSourceRef.current, function (draft) {
|
|
314046
314093
|
if ((preKeys === null || preKeys === void 0 ? void 0 : preKeys.length) > 1) {
|
|
314047
314094
|
var deeps = function deeps(children) {
|
|
@@ -314109,10 +314156,8 @@
|
|
|
314109
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]]));
|
|
314110
314157
|
} else {
|
|
314111
314158
|
if (Array.isArray(defaultRecord)) {
|
|
314112
|
-
console.log(1);
|
|
314113
314159
|
draft.splice.apply(draft, [index + 1, 0].concat(_toConsumableArray$1(defaultRecord)));
|
|
314114
314160
|
} else {
|
|
314115
|
-
console.log(2);
|
|
314116
314161
|
draft.splice(index + 1, 0, defaultRecord || _defineProperty$1({}, _rowKey, "".concat(Date.now())));
|
|
314117
314162
|
}
|
|
314118
314163
|
}
|
|
@@ -314120,7 +314165,7 @@
|
|
|
314120
314165
|
}
|
|
314121
314166
|
});
|
|
314122
314167
|
setDataSource(res);
|
|
314123
|
-
};
|
|
314168
|
+
}, 40);
|
|
314124
314169
|
|
|
314125
314170
|
var handleCopy = function handleCopy(key, value, type, rowIndex) {
|
|
314126
314171
|
var res = fn(dataSourceRef.current, function (draft) {
|
|
@@ -314362,7 +314407,7 @@
|
|
|
314362
314407
|
return handleTableRowDelete(data);
|
|
314363
314408
|
},
|
|
314364
314409
|
addRowData: function addRowData(data, defaultValue, addInChild) {
|
|
314365
|
-
return handleTableRowAdd(data, addInChild, defaultValue);
|
|
314410
|
+
return addInChild === 'replace' ? handleTableRowReplace(data, defaultValue) : handleTableRowAdd(data, addInChild, defaultValue);
|
|
314366
314411
|
},
|
|
314367
314412
|
clearSelect: function clearSelect() {
|
|
314368
314413
|
setLocalRowSelectList({
|
|
@@ -317587,7 +317632,8 @@
|
|
|
317587
317632
|
className: 'lm_tree_select',
|
|
317588
317633
|
value: resetValue,
|
|
317589
317634
|
size: mergeSize,
|
|
317590
|
-
disabled: mergedDisabled
|
|
317635
|
+
disabled: mergedDisabled,
|
|
317636
|
+
treeData: treeData
|
|
317591
317637
|
}, resetProps), children);
|
|
317592
317638
|
});
|
|
317593
317639
|
var LMTreeSelect = CLMTreeSelect;
|