linkmore-design 1.1.13-alpha.1 → 1.1.13-alpha.12
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 +118 -0
- package/dist/Button/demos/ghost.d.ts +2 -0
- package/dist/ConfigProvider/context.d.ts +1 -0
- package/dist/Descriptions/Cell.d.ts +1 -0
- package/dist/Descriptions/Item.d.ts +1 -0
- package/dist/Descriptions/index.d.ts +1 -1
- package/dist/Form/FormWrapper.d.ts +3 -0
- package/dist/Form/WrapperItem.d.ts +4 -0
- package/dist/Form/demos/disabled.d.ts +2 -0
- package/dist/Form/demos/responsive.d.ts +0 -1
- package/dist/Form/index.d.ts +2 -0
- package/dist/Form/interface.d.ts +12 -0
- package/dist/IconFont/demos/ConfigProvider.d.ts +2 -0
- package/dist/IconFont/index.d.ts +1 -2
- package/dist/LmDrag/LmDrag.d.ts +4 -0
- package/dist/LmDrag/components/DndContainer.d.ts +3 -0
- package/dist/LmDrag/components/sortableBox.d.ts +5 -0
- package/dist/LmDrag/components/sortableItem.d.ts +7 -0
- package/dist/LmDrag/demos/basic.d.ts +2 -0
- package/dist/LmDrag/index.d.ts +10 -0
- package/dist/LmDrag/style/index.d.ts +1 -0
- package/dist/LmDrag/style/variables.d.ts +1 -0
- package/dist/LmDrag/wrapper/Root.d.ts +3 -0
- package/dist/LmEditTable/EditTable.d.ts +16 -3
- package/dist/LmEditTable/components/DraggableContainer.d.ts +4 -1
- package/dist/LmEditTable/components/QuickOpetate.d.ts +12 -0
- package/dist/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
- package/dist/LmEditTable/components/index.d.ts +7 -2
- package/dist/LmEditTable/hooks/useForkRef.d.ts +2 -0
- package/dist/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
- package/dist/LmEditTable/util.d.ts +5 -0
- package/dist/LmEditTable/virtual/VirtualRow.d.ts +1 -0
- package/dist/LmFilter/LmFilter.d.ts +2 -6
- package/dist/LmTable/demos/summuy.d.ts +2 -0
- package/dist/LmTable/expression.d.ts +1 -0
- package/dist/LmTable/hooks/useGroupDataSource.d.ts +7 -0
- package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/dist/LmUpload/fns/index.d.ts +1 -0
- package/dist/QuickMenu/demos/useInDraw.d.ts +2 -0
- package/dist/QuickMenu/index.d.ts +3 -1
- package/dist/Select/index.d.ts +3 -0
- package/dist/TreeSelect/demos/treedata.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.umd.js +2811 -1527
- package/dist/index.umd.min.js +17 -17
- package/dist/variables.css +270 -120
- package/es/Button/index.js +4 -3
- package/es/Button/style/index.css +28 -25
- package/es/Button/style/variables.css +28 -25
- package/es/Cascader/index.js +31 -3
- package/es/Cascader/style/index.css +1 -0
- package/es/Cascader/style/variables.css +1 -0
- package/es/ConfigProvider/context.d.ts +1 -0
- package/es/ConfigProvider/index.js +5 -3
- package/es/Descriptions/Cell.d.ts +1 -0
- package/es/Descriptions/Cell.js +5 -2
- package/es/Descriptions/Item.d.ts +1 -0
- package/es/Descriptions/Row.js +6 -1
- package/es/Descriptions/index.d.ts +1 -1
- package/es/Descriptions/index.js +3 -3
- package/es/Descriptions/style/index.css +3 -0
- package/es/Descriptions/style/variables.css +3 -0
- package/es/Form/Form.js +13 -4
- package/es/Form/FormItem/ItemHolder.js +1 -10
- package/es/Form/FormWrapper.d.ts +3 -0
- package/es/Form/FormWrapper.js +22 -0
- package/es/Form/WrapperItem.d.ts +4 -0
- package/es/Form/WrapperItem.js +217 -0
- package/es/Form/container.js +1 -13
- package/es/Form/images/icon_collapse.svg +1 -0
- package/es/Form/index.d.ts +2 -0
- package/es/Form/index.js +2 -0
- package/es/Form/interface.d.ts +12 -0
- package/es/Form/style/index.css +34 -41
- package/es/Form/style/variables.css +34 -41
- package/es/IconFont/index.d.ts +1 -2
- package/es/IconFont/index.js +18 -4
- package/es/ImageViewer/components/Operate.js +4 -7
- package/es/Input/index.js +47 -10
- package/es/InputNumber/index.js +23 -11
- package/es/InputNumber/style/index.css +7 -0
- package/es/InputNumber/style/variables.css +7 -0
- package/es/LmDrag/LmDrag.d.ts +4 -0
- package/es/LmDrag/LmDrag.js +30 -0
- package/es/LmDrag/components/DndContainer.d.ts +3 -0
- package/es/LmDrag/components/DndContainer.js +121 -0
- package/es/LmDrag/components/sortableBox.d.ts +5 -0
- package/es/LmDrag/components/sortableBox.js +23 -0
- package/es/LmDrag/components/sortableItem.d.ts +7 -0
- package/es/LmDrag/components/sortableItem.js +41 -0
- package/es/LmDrag/index.d.ts +10 -0
- package/es/LmDrag/index.js +3 -0
- package/es/LmDrag/style/index.css +0 -0
- package/es/LmDrag/style/index.d.ts +1 -0
- package/es/LmDrag/style/index.js +1 -0
- package/es/LmDrag/style/variables.css +0 -0
- package/es/LmDrag/style/variables.d.ts +1 -0
- package/es/LmDrag/style/variables.js +1 -0
- package/es/LmDrag/wrapper/Root.d.ts +3 -0
- package/es/LmDrag/wrapper/Root.js +12 -0
- package/es/LmEditTable/DragHandle.js +1 -1
- package/es/LmEditTable/EditTable.d.ts +16 -3
- package/es/LmEditTable/EditTable.js +295 -240
- package/es/LmEditTable/components/DraggableContainer.d.ts +4 -1
- package/es/LmEditTable/components/DraggableContainer.js +10 -3
- package/es/LmEditTable/components/QuickOpetate.d.ts +12 -0
- package/es/LmEditTable/components/QuickOpetate.js +82 -0
- package/es/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
- package/es/LmEditTable/components/bottomOpetateComponent.js +23 -0
- package/es/LmEditTable/components/index.d.ts +7 -2
- package/es/LmEditTable/components/index.js +3 -1
- package/es/LmEditTable/hooks/useForkRef.d.ts +2 -0
- package/es/LmEditTable/hooks/useForkRef.js +22 -0
- package/es/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
- package/es/LmEditTable/rowSort/DndContainerRow.js +81 -0
- package/es/LmEditTable/sortableItem.js +1 -0
- package/es/LmEditTable/sortableItemCol.js +40 -10
- package/es/LmEditTable/style/index.css +27 -0
- package/es/LmEditTable/style/variables.css +27 -0
- package/es/LmEditTable/util.d.ts +5 -0
- package/es/LmEditTable/util.js +51 -12
- package/es/LmEditTable/virtual/VirtualRow.d.ts +1 -0
- package/es/LmEditTable/virtual/VirtualRow.js +5 -3
- package/es/LmEditTable/virtual/VirtualRowBack.js +12 -14
- package/es/LmFilter/LmFilter.js +6 -6
- package/es/LmFilter/components/CheckboxFilter.js +9 -4
- package/es/LmFilter/components/DropdownFIlter.js +186 -111
- package/es/LmFilter/components/SelectFilter.js +4 -3
- package/es/LmFilter/filterFns/index.js +5 -7
- package/es/LmFilter/index.js +0 -3
- package/es/LmFilter/style/index.css +82 -54
- package/es/LmFilter/style/variables.css +82 -54
- package/es/LmFilter/utils.js +6 -6
- package/es/LmSelect/style/index.css +1 -0
- package/es/LmSelect/style/variables.css +1 -0
- package/es/LmTable/Table.js +24 -15
- package/es/LmTable/expression.d.ts +1 -0
- package/es/LmTable/expression.js +31 -0
- package/es/LmTable/hooks/useGroupDataSource.js +50 -0
- package/es/LmTable/style/index.css +39 -0
- package/es/LmTable/style/variables.css +39 -0
- package/es/LmTable/virTual/VirtualRow.js +12 -14
- package/es/LmUpload/LmUpload.js +6 -3
- package/es/LmUpload/UploadList/ItemPicture.js +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.js +15 -5
- package/es/LmUpload/UploadList/ItemText.js +7 -2
- package/es/LmUpload/UploadList/index.js +53 -2
- package/es/LmUpload/body/UploadCore.js +4 -1
- package/es/LmUpload/fns/index.d.ts +1 -0
- package/es/LmUpload/fns/index.js +27 -6
- package/es/LmUpload/style/index.css +17 -0
- package/es/LmUpload/style/variables.css +17 -0
- package/es/QuickMenu/index.d.ts +3 -1
- package/es/QuickMenu/index.js +22 -19
- package/es/Select/index.d.ts +3 -0
- package/es/Select/index.js +44 -7
- package/es/Select/style/index.css +28 -0
- package/es/Select/style/variables.css +28 -0
- package/es/TreeSelect/index.js +17 -2
- package/es/TreeSelect/style/index.css +3 -0
- package/es/TreeSelect/style/variables.css +3 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/es/styles/variables.css +270 -120
- package/lib/Button/index.js +4 -3
- package/lib/Button/style/index.css +28 -25
- package/lib/Button/style/variables.css +28 -25
- package/lib/Cascader/index.js +35 -3
- package/lib/Cascader/style/index.css +1 -0
- package/lib/Cascader/style/variables.css +1 -0
- package/lib/ConfigProvider/context.d.ts +1 -0
- package/lib/ConfigProvider/index.js +5 -3
- package/lib/Descriptions/Cell.d.ts +1 -0
- package/lib/Descriptions/Cell.js +5 -2
- package/lib/Descriptions/Item.d.ts +1 -0
- package/lib/Descriptions/Row.js +6 -1
- package/lib/Descriptions/index.d.ts +1 -1
- package/lib/Descriptions/index.js +3 -3
- package/lib/Descriptions/style/index.css +3 -0
- package/lib/Descriptions/style/variables.css +3 -0
- package/lib/Form/Form.js +13 -4
- package/lib/Form/FormItem/ItemHolder.js +1 -10
- package/lib/Form/FormWrapper.d.ts +3 -0
- package/lib/Form/FormWrapper.js +34 -0
- package/lib/Form/WrapperItem.d.ts +4 -0
- package/lib/Form/WrapperItem.js +235 -0
- package/lib/Form/container.js +1 -13
- package/lib/Form/images/icon_collapse.svg +1 -0
- package/lib/Form/index.d.ts +2 -0
- package/lib/Form/index.js +3 -0
- package/lib/Form/interface.d.ts +12 -0
- package/lib/Form/style/index.css +34 -41
- package/lib/Form/style/variables.css +34 -41
- package/lib/IconFont/index.d.ts +1 -2
- package/lib/IconFont/index.js +25 -4
- package/lib/ImageViewer/components/Operate.js +4 -8
- package/lib/Input/index.js +52 -10
- package/lib/InputNumber/index.js +29 -11
- package/lib/InputNumber/style/index.css +7 -0
- package/lib/InputNumber/style/variables.css +7 -0
- package/lib/LmDrag/LmDrag.d.ts +4 -0
- package/lib/LmDrag/LmDrag.js +44 -0
- package/lib/LmDrag/components/DndContainer.d.ts +3 -0
- package/lib/LmDrag/components/DndContainer.js +138 -0
- package/lib/LmDrag/components/sortableBox.d.ts +5 -0
- package/lib/LmDrag/components/sortableBox.js +37 -0
- package/lib/LmDrag/components/sortableItem.d.ts +7 -0
- package/lib/LmDrag/components/sortableItem.js +54 -0
- package/lib/LmDrag/index.d.ts +10 -0
- package/lib/LmDrag/index.js +19 -0
- package/lib/LmDrag/style/index.css +0 -0
- package/lib/LmDrag/style/index.d.ts +1 -0
- package/lib/LmDrag/style/index.js +3 -0
- package/lib/LmDrag/style/variables.css +0 -0
- package/lib/LmDrag/style/variables.d.ts +1 -0
- package/lib/LmDrag/style/variables.js +3 -0
- package/lib/LmDrag/wrapper/Root.d.ts +3 -0
- package/lib/LmDrag/wrapper/Root.js +26 -0
- package/lib/LmEditTable/DragHandle.js +1 -1
- package/lib/LmEditTable/EditTable.d.ts +16 -3
- package/lib/LmEditTable/EditTable.js +290 -235
- package/lib/LmEditTable/components/DraggableContainer.d.ts +4 -1
- package/lib/LmEditTable/components/DraggableContainer.js +12 -5
- package/lib/LmEditTable/components/QuickOpetate.d.ts +12 -0
- package/lib/LmEditTable/components/QuickOpetate.js +96 -0
- package/lib/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
- package/lib/LmEditTable/components/bottomOpetateComponent.js +34 -0
- package/lib/LmEditTable/components/index.d.ts +7 -2
- package/lib/LmEditTable/components/index.js +16 -0
- package/lib/LmEditTable/hooks/useForkRef.d.ts +2 -0
- package/lib/LmEditTable/hooks/useForkRef.js +29 -0
- package/lib/LmEditTable/rowSort/DndContainerRow.d.ts +10 -0
- package/lib/LmEditTable/rowSort/DndContainerRow.js +99 -0
- package/lib/LmEditTable/sortableItem.js +1 -0
- package/lib/LmEditTable/sortableItemCol.js +37 -8
- package/lib/LmEditTable/style/index.css +27 -0
- package/lib/LmEditTable/style/variables.css +27 -0
- package/lib/LmEditTable/util.d.ts +5 -0
- package/lib/LmEditTable/util.js +52 -11
- package/lib/LmEditTable/virtual/VirtualRow.d.ts +1 -0
- package/lib/LmEditTable/virtual/VirtualRow.js +8 -3
- package/lib/LmEditTable/virtual/VirtualRowBack.js +12 -14
- package/lib/LmFilter/LmFilter.js +6 -6
- package/lib/LmFilter/components/CheckboxFilter.js +9 -4
- package/lib/LmFilter/components/DropdownFIlter.js +186 -111
- package/lib/LmFilter/components/SelectFilter.js +4 -3
- package/lib/LmFilter/filterFns/index.js +5 -7
- package/lib/LmFilter/index.js +0 -3
- package/lib/LmFilter/style/index.css +82 -54
- package/lib/LmFilter/style/variables.css +82 -54
- package/lib/LmFilter/utils.js +6 -6
- package/lib/LmSelect/style/index.css +1 -0
- package/lib/LmSelect/style/variables.css +1 -0
- package/lib/LmTable/Table.js +24 -15
- package/lib/LmTable/expression.d.ts +1 -0
- package/lib/LmTable/expression.js +41 -0
- package/lib/LmTable/hooks/useGroupDataSource.js +50 -0
- package/lib/LmTable/style/index.css +39 -0
- package/lib/LmTable/style/variables.css +39 -0
- package/lib/LmTable/virTual/VirtualRow.js +12 -14
- package/lib/LmUpload/LmUpload.js +9 -3
- package/lib/LmUpload/UploadList/ItemPicture.js +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.js +15 -5
- package/lib/LmUpload/UploadList/ItemText.js +7 -2
- package/lib/LmUpload/UploadList/index.js +54 -2
- package/lib/LmUpload/body/UploadCore.js +5 -1
- package/lib/LmUpload/fns/index.d.ts +1 -0
- package/lib/LmUpload/fns/index.js +27 -6
- package/lib/LmUpload/style/index.css +17 -0
- package/lib/LmUpload/style/variables.css +17 -0
- package/lib/QuickMenu/index.d.ts +3 -1
- package/lib/QuickMenu/index.js +21 -18
- package/lib/Select/index.d.ts +3 -0
- package/lib/Select/index.js +47 -7
- package/lib/Select/style/index.css +28 -0
- package/lib/Select/style/variables.css +28 -0
- package/lib/TreeSelect/index.js +21 -2
- package/lib/TreeSelect/style/index.css +3 -0
- package/lib/TreeSelect/style/variables.css +3 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +15 -1
- package/lib/styles/variables.css +270 -120
- package/package.json +5 -1
|
@@ -47,26 +47,22 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
47
47
|
}
|
|
48
48
|
return t;
|
|
49
49
|
};
|
|
50
|
-
/* eslint-disable no-unused-vars */
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
import { PlusCircleOutlined } from '@ant-design/icons';
|
|
54
51
|
import moment from 'moment';
|
|
55
52
|
import { arrayMove } from '@dnd-kit/sortable';
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
53
|
+
import { Checkbox, IconFont, Input, InputNumber, Radio, Select, Table, Switch, DatePicker, Form } from 'linkmore-design';
|
|
54
|
+
import { isFunction, omit, isEqual, pick, isBoolean, isObject, debounce } from 'lodash';
|
|
58
55
|
import React, { forwardRef, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState, memo, useCallback } from 'react';
|
|
59
56
|
import { useControllableValue } from 'ahooks';
|
|
60
57
|
import { produce } from 'immer';
|
|
61
|
-
import DndContainer from './DndContainer';
|
|
62
|
-
|
|
58
|
+
import DndContainer from './DndContainer';
|
|
63
59
|
import SortableBoxCol from './sortableBoxCol';
|
|
64
60
|
import SortableItem from './sortableItem';
|
|
65
61
|
import ColSortableItem from './sortableItemCol';
|
|
66
62
|
import DragHandle from './DragHandle';
|
|
67
63
|
import UploadOss from '../UploadOss';
|
|
68
|
-
import { isObjEmpty, deepDataSourcePreKeys, isExpandRow, checkRowKeyByDataSource, checkMemoShouldUploadSpecialFun } from './util';
|
|
69
|
-
import { DraggableContainer } from './components';
|
|
64
|
+
import { isObjEmpty, deepDataSourcePreKeys, isExpandRow, checkRowKeyByDataSource, checkMemoShouldUploadSpecialFun, checkExpandIconColumnIndex } from './util';
|
|
65
|
+
import { DraggableContainer, BottomOpetateComponent, QuickOpetate } from './components';
|
|
70
66
|
import cls from 'classnames';
|
|
71
67
|
import { VirtualTable, VirtualWrapper, VirtualRow } from './virtual';
|
|
72
68
|
var UploadBtn = UploadOss.UploadBtn;
|
|
@@ -99,6 +95,7 @@ var EditableSortRow = function EditableSortRow(_a) {
|
|
|
99
95
|
|
|
100
96
|
return /*#__PURE__*/React.createElement(Form, {
|
|
101
97
|
form: form,
|
|
98
|
+
disabled: props.disabled || false,
|
|
102
99
|
component: false
|
|
103
100
|
}, /*#__PURE__*/React.createElement(EditableContext.Provider, {
|
|
104
101
|
value: form
|
|
@@ -229,80 +226,6 @@ var InputRange = function InputRange(_a) {
|
|
|
229
226
|
return handleInput(e, 'next');
|
|
230
227
|
}
|
|
231
228
|
}, editEnum))));
|
|
232
|
-
}; // 操作列
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
var Opetate = function Opetate(_ref) {
|
|
236
|
-
var record = _ref.record,
|
|
237
|
-
rowKey = _ref.rowKey,
|
|
238
|
-
handleAdd = _ref.handleAdd,
|
|
239
|
-
handleDelete = _ref.handleDelete,
|
|
240
|
-
_ref$options = _ref.options,
|
|
241
|
-
options = _ref$options === void 0 ? ['add', 'delete'] : _ref$options,
|
|
242
|
-
getLength = _ref.getLength,
|
|
243
|
-
quickOpetateClearAll = _ref.quickOpetateClearAll;
|
|
244
|
-
|
|
245
|
-
var appendChildren = function appendChildren() {
|
|
246
|
-
handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record, true);
|
|
247
|
-
};
|
|
248
|
-
|
|
249
|
-
var appendAdd = function appendAdd() {
|
|
250
|
-
handleAdd === null || handleAdd === void 0 ? void 0 : handleAdd(record);
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
254
|
-
style: {
|
|
255
|
-
display: 'flex',
|
|
256
|
-
alignItems: 'center',
|
|
257
|
-
justifyContent: 'flex-start',
|
|
258
|
-
marginLeft: '-4px'
|
|
259
|
-
}
|
|
260
|
-
}, options.includes('delete') && /*#__PURE__*/React.createElement(Button, {
|
|
261
|
-
type: "link",
|
|
262
|
-
size: "small",
|
|
263
|
-
disabled: !quickOpetateClearAll && getLength < 2,
|
|
264
|
-
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
265
|
-
type: "lmweb-minus-circle",
|
|
266
|
-
style: {
|
|
267
|
-
fontSize: 16
|
|
268
|
-
}
|
|
269
|
-
}),
|
|
270
|
-
onClick: function onClick() {
|
|
271
|
-
return handleDelete(record[rowKey]);
|
|
272
|
-
}
|
|
273
|
-
}), (options === null || options === void 0 ? void 0 : options.includes('add')) && (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? /*#__PURE__*/React.createElement(Popover, {
|
|
274
|
-
placement: "bottom",
|
|
275
|
-
overlayClassName: "lm_table_append_add_popover",
|
|
276
|
-
open: open,
|
|
277
|
-
title: null,
|
|
278
|
-
content: /*#__PURE__*/React.createElement("ul", null, /*#__PURE__*/React.createElement("li", {
|
|
279
|
-
onClick: appendAdd
|
|
280
|
-
}, "\u6DFB\u52A0\u5E73\u7EA7"), /*#__PURE__*/React.createElement("li", {
|
|
281
|
-
onClick: appendChildren
|
|
282
|
-
}, "\u6DFB\u52A0\u5B50\u7EA7")),
|
|
283
|
-
trigger: "hover"
|
|
284
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
285
|
-
type: "link",
|
|
286
|
-
size: "small",
|
|
287
|
-
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
288
|
-
type: "lmweb-plus-circle-fill",
|
|
289
|
-
style: {
|
|
290
|
-
fontSize: 16
|
|
291
|
-
}
|
|
292
|
-
})
|
|
293
|
-
})) : /*#__PURE__*/React.createElement(Button, {
|
|
294
|
-
type: "link",
|
|
295
|
-
size: "small",
|
|
296
|
-
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
297
|
-
type: "lmweb-plus-circle-fill",
|
|
298
|
-
style: {
|
|
299
|
-
fontSize: 16
|
|
300
|
-
}
|
|
301
|
-
}),
|
|
302
|
-
onClick: function onClick() {
|
|
303
|
-
return handleAdd(record, (options === null || options === void 0 ? void 0 : options.includes('addInChildren')) ? true : false);
|
|
304
|
-
}
|
|
305
|
-
}));
|
|
306
229
|
};
|
|
307
230
|
/*
|
|
308
231
|
表格单元格
|
|
@@ -333,9 +256,7 @@ var EditableCell = function EditableCell(props) {
|
|
|
333
256
|
handleDelete = props.handleDelete,
|
|
334
257
|
handleCopy = props.handleCopy,
|
|
335
258
|
itemProps = props.itemProps,
|
|
336
|
-
|
|
337
|
-
reWriteOriginSource = props.reWriteOriginSource,
|
|
338
|
-
restProps = __rest(props, ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps", "setValid", "reWriteOriginSource"]);
|
|
259
|
+
restProps = __rest(props, ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps"]);
|
|
339
260
|
/** 去除移入移出功能,保留最纯粹的功能,优化性能 */
|
|
340
261
|
|
|
341
262
|
|
|
@@ -423,13 +344,7 @@ var EditableCell = function EditableCell(props) {
|
|
|
423
344
|
case 13:
|
|
424
345
|
if (col === null || col === void 0 ? void 0 : col.hoverEdit) {
|
|
425
346
|
toggleEdit();
|
|
426
|
-
}
|
|
427
|
-
// setValid((old) => {
|
|
428
|
-
// const obj = { ...old }
|
|
429
|
-
// delete obj[record[rowKey]]
|
|
430
|
-
// return obj
|
|
431
|
-
// })
|
|
432
|
-
|
|
347
|
+
}
|
|
433
348
|
|
|
434
349
|
_context.next = 18;
|
|
435
350
|
break;
|
|
@@ -461,7 +376,16 @@ var EditableCell = function EditableCell(props) {
|
|
|
461
376
|
};
|
|
462
377
|
|
|
463
378
|
var Control = function Control(con) {
|
|
379
|
+
var _a;
|
|
380
|
+
|
|
464
381
|
var resultComponentProps = isFunction(componentProps) ? componentProps === null || componentProps === void 0 ? void 0 : componentProps(record, col) : componentProps;
|
|
382
|
+
|
|
383
|
+
if (isFunction(componentProps) && ((_a = col === null || col === void 0 ? void 0 : col.newOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
384
|
+
resultComponentProps = Object.assign(Object.assign({}, resultComponentProps), {
|
|
385
|
+
options: col === null || col === void 0 ? void 0 : col.newOptions
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
|
|
465
389
|
var clearAttrComponentProps = omit(resultComponentProps, ['optionOnly', 'isOnlyValue', 'quickcopy']);
|
|
466
390
|
|
|
467
391
|
switch (con) {
|
|
@@ -488,8 +412,7 @@ var EditableCell = function EditableCell(props) {
|
|
|
488
412
|
|
|
489
413
|
case 'inputRange':
|
|
490
414
|
return /*#__PURE__*/React.createElement(InputRange, Object.assign({
|
|
491
|
-
onChange: handleFormItemChange
|
|
492
|
-
ref: inputRef
|
|
415
|
+
onChange: handleFormItemChange
|
|
493
416
|
}, resultComponentProps, {
|
|
494
417
|
record: record,
|
|
495
418
|
rowIndex: rowIndex,
|
|
@@ -579,10 +502,9 @@ var EditableCell = function EditableCell(props) {
|
|
|
579
502
|
|
|
580
503
|
case 'operate':
|
|
581
504
|
case 'lm_edit_opetate':
|
|
582
|
-
return /*#__PURE__*/React.createElement(
|
|
505
|
+
return /*#__PURE__*/React.createElement(QuickOpetate, Object.assign({
|
|
583
506
|
record: record,
|
|
584
507
|
rowKey: rowKey,
|
|
585
|
-
ref: inputRef,
|
|
586
508
|
handleAdd: handleTableRowAdd,
|
|
587
509
|
handleDelete: handleTableRowDelete,
|
|
588
510
|
getLength: getLength,
|
|
@@ -591,11 +513,12 @@ var EditableCell = function EditableCell(props) {
|
|
|
591
513
|
|
|
592
514
|
case 'render':
|
|
593
515
|
{
|
|
594
|
-
var
|
|
516
|
+
var _resultComponentProps = resultComponentProps,
|
|
517
|
+
render = _resultComponentProps.render;
|
|
595
518
|
var fromData = form.getFieldsValue();
|
|
596
519
|
return render === null || render === void 0 ? void 0 : render(Object.assign(Object.assign({}, !isObjEmpty(fromData) ? Object.assign(Object.assign({}, record), _defineProperty({}, dataIndex, fromData[dataIndex])) : record), {
|
|
597
520
|
onChange: save
|
|
598
|
-
}));
|
|
521
|
+
}), rowIndex);
|
|
599
522
|
}
|
|
600
523
|
|
|
601
524
|
default:
|
|
@@ -632,7 +555,8 @@ var EditableCell = function EditableCell(props) {
|
|
|
632
555
|
valuePropName: editable === 'switch' ? 'checked' : 'value',
|
|
633
556
|
style: {
|
|
634
557
|
margin: 0
|
|
635
|
-
}
|
|
558
|
+
},
|
|
559
|
+
noStyle: formProps ? false : true
|
|
636
560
|
}, formProps, {
|
|
637
561
|
name: dataIndex
|
|
638
562
|
}), Control(editable)));
|
|
@@ -644,6 +568,7 @@ var EditableCell = function EditableCell(props) {
|
|
|
644
568
|
margin: 0
|
|
645
569
|
}
|
|
646
570
|
}, formProps, {
|
|
571
|
+
noStyle: formProps ? false : true,
|
|
647
572
|
name: [dataIndex, 'value']
|
|
648
573
|
}), Control(editable)));
|
|
649
574
|
}
|
|
@@ -654,14 +579,14 @@ var EditableCell = function EditableCell(props) {
|
|
|
654
579
|
}
|
|
655
580
|
|
|
656
581
|
return childNode;
|
|
657
|
-
}, [col, isEdit, editing, getLength]); // 出现死循环找我
|
|
582
|
+
}, [col, isEdit, editing, getLength, record]); // 出现死循环找我
|
|
658
583
|
|
|
659
584
|
useEffect(function () {
|
|
660
585
|
var editable = col.editable,
|
|
661
586
|
dataIndex = col.dataIndex;
|
|
662
587
|
|
|
663
588
|
if (isEdit && editable) {
|
|
664
|
-
form.setFieldsValue(_defineProperty({}, dataIndex, editable === 'date' ? moment(record[dataIndex]) : record[dataIndex]));
|
|
589
|
+
form.setFieldsValue(_defineProperty({}, dataIndex, editable === 'date' && record[dataIndex] ? moment(record[dataIndex]) : record[dataIndex]));
|
|
665
590
|
}
|
|
666
591
|
}, [record]);
|
|
667
592
|
|
|
@@ -700,10 +625,16 @@ var EditableCell = function EditableCell(props) {
|
|
|
700
625
|
var MemoEditableCell = /*#__PURE__*/memo(EditableCell, function (prev, next) {
|
|
701
626
|
var pickProps = ['record', 'colIndex'];
|
|
702
627
|
var p = pick(prev, pickProps);
|
|
703
|
-
var n = pick(next, pickProps);
|
|
628
|
+
var n = pick(next, pickProps);
|
|
629
|
+
|
|
630
|
+
if (next === null || next === void 0 ? void 0 : next.shouldUpdate) {
|
|
631
|
+
return false;
|
|
632
|
+
} // console.log(!checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n), '22', prev.record, next.record)
|
|
633
|
+
// console.log('333', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
|
|
704
634
|
|
|
705
635
|
/** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
|
|
706
636
|
|
|
637
|
+
|
|
707
638
|
if (!checkMemoShouldUploadSpecialFun(prev, next)) {
|
|
708
639
|
return false;
|
|
709
640
|
}
|
|
@@ -711,6 +642,8 @@ var MemoEditableCell = /*#__PURE__*/memo(EditableCell, function (prev, next) {
|
|
|
711
642
|
return isEqual(p, n);
|
|
712
643
|
});
|
|
713
644
|
var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
645
|
+
var _a, _b;
|
|
646
|
+
|
|
714
647
|
var defaultData = props.value,
|
|
715
648
|
columns = props.columns,
|
|
716
649
|
isEdit = props.isEdit,
|
|
@@ -729,16 +662,19 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
729
662
|
rowSelection = props.rowSelection,
|
|
730
663
|
virtual = props.virtual,
|
|
731
664
|
sortOpen = props.sortOpen,
|
|
665
|
+
disabled = props.disabled,
|
|
732
666
|
colSortOpen = props.colSortOpen,
|
|
667
|
+
_props$indexCol = props.indexCol,
|
|
668
|
+
indexCol = _props$indexCol === void 0 ? false : _props$indexCol,
|
|
733
669
|
filterChange = props.filterChange,
|
|
734
670
|
_props$size = props.size,
|
|
735
671
|
size = _props$size === void 0 ? 'small' : _props$size,
|
|
736
672
|
recordCreatorProps = props.recordCreatorProps,
|
|
737
673
|
_props$shouldUpdate = props.shouldUpdate,
|
|
738
674
|
shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
675
|
+
_props$loading = props.loading,
|
|
676
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
677
|
+
resetProps = __rest(props, ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "virtual", "sortOpen", "disabled", "colSortOpen", "indexCol", "filterChange", "size", "recordCreatorProps", "shouldUpdate", "loading"]);
|
|
742
678
|
|
|
743
679
|
var _useControllableValue = useControllableValue({
|
|
744
680
|
value: checkRowKeyByDataSource(props.value, _rowKey),
|
|
@@ -746,30 +682,36 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
746
682
|
}),
|
|
747
683
|
_useControllableValue2 = _slicedToArray(_useControllableValue, 2),
|
|
748
684
|
dataSource = _useControllableValue2[0],
|
|
749
|
-
setDataSource = _useControllableValue2[1];
|
|
685
|
+
setDataSource = _useControllableValue2[1];
|
|
750
686
|
|
|
687
|
+
var transformRowSelect = function transformRowSelect(selectedRowKeys, selectedRows, info) {
|
|
688
|
+
var _a;
|
|
751
689
|
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
_valid = _useState8[0],
|
|
755
|
-
setValid = _useState8[1];
|
|
690
|
+
return (_a = rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.onChange) === null || _a === void 0 ? void 0 : _a.call(rowSelection, selectedRowKeys, selectedRows, info);
|
|
691
|
+
};
|
|
756
692
|
|
|
757
|
-
var
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
693
|
+
var _useControllableValue3 = useControllableValue({
|
|
694
|
+
value: {
|
|
695
|
+
selectedRows: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || []
|
|
696
|
+
},
|
|
697
|
+
onChange: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.onChange) ? transformRowSelect : undefined
|
|
698
|
+
}),
|
|
699
|
+
_useControllableValue4 = _slicedToArray(_useControllableValue3, 2),
|
|
700
|
+
localRowSelectList = _useControllableValue4[0],
|
|
701
|
+
setLocalRowSelectList = _useControllableValue4[1];
|
|
702
|
+
/** TODO: 当前展开的列 */
|
|
762
703
|
|
|
763
704
|
|
|
764
|
-
var
|
|
765
|
-
|
|
766
|
-
expandedRowKeys =
|
|
767
|
-
setExpandedRowKeys =
|
|
705
|
+
var _useState7 = useState([]),
|
|
706
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
707
|
+
expandedRowKeys = _useState8[0],
|
|
708
|
+
setExpandedRowKeys = _useState8[1];
|
|
768
709
|
|
|
769
710
|
var dataSourceRef = useRef(dataSource);
|
|
770
711
|
var deepDataSourceRef = useRef(deepDataSourcePreKeys(dataSource, _rowKey));
|
|
771
712
|
dataSourceRef.current = dataSource;
|
|
772
713
|
deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
|
|
714
|
+
var tableWarpRef = useRef(null);
|
|
773
715
|
|
|
774
716
|
var onColSortEnd = function onColSortEnd(active, over) {
|
|
775
717
|
var _a;
|
|
@@ -791,41 +733,21 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
791
733
|
var handleDelete = function handleDelete(key) {
|
|
792
734
|
var nValue = dataSource.filter(function (item) {
|
|
793
735
|
return item[_rowKey] !== key;
|
|
794
|
-
});
|
|
795
|
-
|
|
736
|
+
});
|
|
796
737
|
setDataSource(nValue);
|
|
797
738
|
};
|
|
798
|
-
/**
|
|
739
|
+
/** 点击底部添加按钮添加 */
|
|
799
740
|
|
|
800
741
|
|
|
801
|
-
var handleAdd = function
|
|
742
|
+
var handleAdd = debounce(function (row) {
|
|
802
743
|
var _a;
|
|
803
744
|
|
|
804
745
|
var addDataInfo = isFunction(recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData) ? (_a = recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData) === null || _a === void 0 ? void 0 : _a.call(recordCreatorProps) : recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData;
|
|
805
746
|
var res = produce(dataSourceRef.current, function (draft) {
|
|
806
747
|
draft.push(Object.assign(_defineProperty({}, _rowKey, "".concat(Date.now())), addDataInfo || {}));
|
|
807
748
|
});
|
|
808
|
-
setDataSource(res);
|
|
809
|
-
};
|
|
810
|
-
/** 本地缓存一个选择数据 */
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
useEffect(function () {
|
|
814
|
-
if (rowSelection) {
|
|
815
|
-
var selectedRowKeys = rowSelection.selectedRowKeys;
|
|
816
|
-
|
|
817
|
-
if (selectedRowKeys) {
|
|
818
|
-
setLocalRowSelectList(localRowSelectList || []);
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
}, [rowSelection]);
|
|
822
|
-
|
|
823
|
-
var editTableRowChange = function editTableRowChange(selectRows) {
|
|
824
|
-
var _a;
|
|
825
|
-
|
|
826
|
-
setLocalRowSelectList(selectRows);
|
|
827
|
-
(_a = rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.onChange) === null || _a === void 0 ? void 0 : _a.call(rowSelection, selectRows);
|
|
828
|
-
};
|
|
749
|
+
setDataSource(res);
|
|
750
|
+
}, 40);
|
|
829
751
|
|
|
830
752
|
var handleSave = function handleSave(row, options) {
|
|
831
753
|
var _a, _b;
|
|
@@ -833,9 +755,9 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
833
755
|
var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[row[_rowKey]]) === null || _b === void 0 ? void 0 : _b.preKeys;
|
|
834
756
|
var res = produce(dataSourceRef.current, function (draft) {
|
|
835
757
|
if (options === null || options === void 0 ? void 0 : options.only) {
|
|
836
|
-
var
|
|
837
|
-
key =
|
|
838
|
-
value =
|
|
758
|
+
var _ref = options === null || options === void 0 ? void 0 : options.only,
|
|
759
|
+
key = _ref.key,
|
|
760
|
+
value = _ref.value;
|
|
839
761
|
|
|
840
762
|
if ((preKeys === null || preKeys === void 0 ? void 0 : preKeys.length) > 1) {
|
|
841
763
|
var deeps = function deeps(children) {
|
|
@@ -898,25 +820,26 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
898
820
|
}
|
|
899
821
|
});
|
|
900
822
|
setDataSource(res);
|
|
901
|
-
};
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
var handleTableRowDelete = function
|
|
823
|
+
}; // const reWriteOriginSource = (rowKey: string, rowValue, dataIndex: number, nextValue) => {
|
|
824
|
+
// setDataSource((prevDataSource) => {
|
|
825
|
+
// return prevDataSource?.map((item) => {
|
|
826
|
+
// if (get(item, rowKey) === rowValue) {
|
|
827
|
+
// set(item, dataIndex, nextValue)
|
|
828
|
+
// }
|
|
829
|
+
// return item
|
|
830
|
+
// })
|
|
831
|
+
// })
|
|
832
|
+
// }
|
|
833
|
+
// @ts-ignore
|
|
834
|
+
|
|
835
|
+
/** 删除当前行 */
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
var handleTableRowDelete = debounce(function (key) {
|
|
917
839
|
var _a, _b, _c;
|
|
918
840
|
|
|
919
|
-
var
|
|
841
|
+
var rkey = isObject(key) ? key[_rowKey] : key;
|
|
842
|
+
var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[rkey]) === null || _b === void 0 ? void 0 : _b.preKeys;
|
|
920
843
|
|
|
921
844
|
if (preKeys.length > 1) {
|
|
922
845
|
/** 说明删除的是children中的数据 */
|
|
@@ -937,7 +860,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
937
860
|
return newData;
|
|
938
861
|
};
|
|
939
862
|
|
|
940
|
-
var res = filter(
|
|
863
|
+
var res = filter(dataSourceRef.current, key);
|
|
941
864
|
setDataSource(res);
|
|
942
865
|
} else {
|
|
943
866
|
if (((_c = dataSourceRef.current) === null || _c === void 0 ? void 0 : _c.length) === 1 && !quickOpetateClearAll) {
|
|
@@ -956,34 +879,76 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
956
879
|
|
|
957
880
|
setDataSource(_res);
|
|
958
881
|
}
|
|
959
|
-
};
|
|
960
|
-
/** 快捷添加 */
|
|
961
882
|
|
|
883
|
+
return null;
|
|
884
|
+
}, 40);
|
|
885
|
+
/** 替换当前行 */
|
|
962
886
|
|
|
963
|
-
var
|
|
887
|
+
var handleTableRowReplace = debounce(function (record, defaultRecord) {
|
|
964
888
|
var _a, _b;
|
|
965
889
|
|
|
966
|
-
var
|
|
890
|
+
var rkey = isObject(record) ? record[_rowKey] : record;
|
|
891
|
+
var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[rkey]) === null || _b === void 0 ? void 0 : _b.preKeys; // const res = cloneDeep(dataSourceRef.current)
|
|
892
|
+
|
|
893
|
+
var deep = function deep(children) {
|
|
894
|
+
return children.map(function (item) {
|
|
895
|
+
if (item[_rowKey] === rkey) {
|
|
896
|
+
return defaultRecord;
|
|
897
|
+
} else if (preKeys.includes(item[_rowKey]) && item.children) {
|
|
898
|
+
var child = deep(item.children);
|
|
899
|
+
return Object.assign(Object.assign({}, item), {
|
|
900
|
+
children: child
|
|
901
|
+
});
|
|
902
|
+
} else {
|
|
903
|
+
return item;
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
var res = deep(dataSourceRef.current);
|
|
909
|
+
setDataSource(res);
|
|
910
|
+
}, 40);
|
|
911
|
+
/** 快捷添加 */
|
|
912
|
+
|
|
913
|
+
var handleTableRowAdd = debounce(function (record, isAppendInChindren, defaultRecord) {
|
|
914
|
+
var _a, _b;
|
|
915
|
+
|
|
916
|
+
var rkey = isObject(record) ? record[_rowKey] : record;
|
|
917
|
+
var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[rkey]) === null || _b === void 0 ? void 0 : _b.preKeys;
|
|
967
918
|
var res = produce(dataSourceRef.current, function (draft) {
|
|
968
|
-
var _a, _b, _c, _d;
|
|
919
|
+
var _a, _b, _c, _d, _e;
|
|
969
920
|
|
|
970
|
-
if (preKeys.length > 1) {
|
|
921
|
+
if ((preKeys === null || preKeys === void 0 ? void 0 : preKeys.length) > 1) {
|
|
971
922
|
var deeps = function deeps(children) {
|
|
972
923
|
children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
|
|
973
|
-
var _a;
|
|
924
|
+
var _a, _b;
|
|
974
925
|
|
|
975
926
|
if (preKeys === null || preKeys === void 0 ? void 0 : preKeys.includes(item[_rowKey])) {
|
|
976
|
-
if (item[_rowKey] ===
|
|
927
|
+
if (item[_rowKey] === rkey) {
|
|
977
928
|
if (isAppendInChindren) {
|
|
978
929
|
if (item === null || item === void 0 ? void 0 : item.children) {
|
|
979
|
-
|
|
930
|
+
if (Array.isArray(defaultRecord)) {
|
|
931
|
+
var _a2;
|
|
932
|
+
|
|
933
|
+
(_a = item === null || item === void 0 ? void 0 : item.children) === null || _a === void 0 ? void 0 : (_a2 = _a).push.apply(_a2, _toConsumableArray(defaultRecord));
|
|
934
|
+
} else {
|
|
935
|
+
(_b = item === null || item === void 0 ? void 0 : item.children) === null || _b === void 0 ? void 0 : _b.push(defaultRecord || _defineProperty({}, _rowKey, "".concat(Date.now())));
|
|
936
|
+
}
|
|
980
937
|
} else {
|
|
981
|
-
|
|
938
|
+
if (Array.isArray(defaultRecord)) {
|
|
939
|
+
item.children = _toConsumableArray(defaultRecord);
|
|
940
|
+
} else {
|
|
941
|
+
item.children = [defaultRecord || _defineProperty({}, _rowKey, "".concat(Date.now()))];
|
|
942
|
+
}
|
|
982
943
|
}
|
|
983
944
|
|
|
984
945
|
!expandedRowKeys.includes(item[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray(expandedRowKeys), [item[_rowKey]]));
|
|
985
946
|
} else {
|
|
986
|
-
|
|
947
|
+
if (Array.isArray(defaultRecord)) {
|
|
948
|
+
children.splice.apply(children, [index + 1, 0].concat(_toConsumableArray(defaultRecord)));
|
|
949
|
+
} else {
|
|
950
|
+
children.splice(index + 1, 0, defaultRecord || _defineProperty({}, _rowKey, "".concat(Date.now())));
|
|
951
|
+
}
|
|
987
952
|
}
|
|
988
953
|
} else if (item.children) {
|
|
989
954
|
deeps(item.children);
|
|
@@ -995,26 +960,37 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
995
960
|
deeps(draft);
|
|
996
961
|
} else {
|
|
997
962
|
var index = draft.findIndex(function (item) {
|
|
998
|
-
return
|
|
963
|
+
return rkey === item[_rowKey];
|
|
999
964
|
});
|
|
1000
965
|
|
|
1001
966
|
if (index !== -1) {
|
|
1002
967
|
if (isAppendInChindren) {
|
|
1003
968
|
if ((_a = draft[index].children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1004
|
-
|
|
969
|
+
if (Array.isArray(defaultRecord)) {
|
|
970
|
+
var _b2;
|
|
971
|
+
|
|
972
|
+
(_b = draft[index].children) === null || _b === void 0 ? void 0 : (_b2 = _b).push.apply(_b2, _toConsumableArray(defaultRecord));
|
|
973
|
+
} else {
|
|
974
|
+
(_c = draft[index].children) === null || _c === void 0 ? void 0 : _c.push(defaultRecord || _defineProperty({}, _rowKey, "".concat(Date.now())));
|
|
975
|
+
}
|
|
1005
976
|
} else {
|
|
1006
|
-
draft[index].children = [_defineProperty({}, _rowKey, "".concat(Date.now()))];
|
|
977
|
+
draft[index].children = Array.isArray(defaultRecord) ? _toConsumableArray(defaultRecord) : [defaultRecord || _defineProperty({}, _rowKey, "".concat(Date.now()))];
|
|
1007
978
|
}
|
|
1008
979
|
|
|
1009
|
-
!expandedRowKeys.includes((
|
|
980
|
+
!expandedRowKeys.includes((_d = draft[index]) === null || _d === void 0 ? void 0 : _d[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray(expandedRowKeys), [(_e = draft[index]) === null || _e === void 0 ? void 0 : _e[_rowKey]]));
|
|
1010
981
|
} else {
|
|
1011
|
-
|
|
982
|
+
if (Array.isArray(defaultRecord)) {
|
|
983
|
+
draft.splice.apply(draft, [index + 1, 0].concat(_toConsumableArray(defaultRecord)));
|
|
984
|
+
} else {
|
|
985
|
+
draft.splice(index + 1, 0, defaultRecord || _defineProperty({}, _rowKey, "".concat(Date.now())));
|
|
986
|
+
}
|
|
1012
987
|
}
|
|
1013
988
|
}
|
|
1014
989
|
}
|
|
1015
990
|
});
|
|
1016
991
|
setDataSource(res);
|
|
1017
|
-
};
|
|
992
|
+
}, 50);
|
|
993
|
+
/** 快捷刷子功能 */
|
|
1018
994
|
|
|
1019
995
|
var handleCopy = function handleCopy(key, value, type, rowIndex) {
|
|
1020
996
|
var res = produce(dataSourceRef.current, function (draft) {
|
|
@@ -1033,8 +1009,9 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1033
1009
|
var hasOnlyOptionsDatas = columns.filter(function (item) {
|
|
1034
1010
|
var _a;
|
|
1035
1011
|
|
|
1036
|
-
|
|
1037
|
-
|
|
1012
|
+
var resultComponentProps = isFunction(item === null || item === void 0 ? void 0 : item.componentProps) ? (_a = item === null || item === void 0 ? void 0 : item.componentProps) === null || _a === void 0 ? void 0 : _a.call(item, {}, item) : item === null || item === void 0 ? void 0 : item.componentProps;
|
|
1013
|
+
return resultComponentProps === null || resultComponentProps === void 0 ? void 0 : resultComponentProps.optionOnly;
|
|
1014
|
+
}); // const hasOnlyOptionsDatas = columns.filter((item) => item?.componentProps?.optionOnly)
|
|
1038
1015
|
|
|
1039
1016
|
if (hasOnlyOptionsDatas.length) {
|
|
1040
1017
|
return hasOnlyOptionsDatas === null || hasOnlyOptionsDatas === void 0 ? void 0 : hasOnlyOptionsDatas.map(function (item) {
|
|
@@ -1048,9 +1025,13 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1048
1025
|
|
|
1049
1026
|
var DisableOptions = useMemo(function () {
|
|
1050
1027
|
var newColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (item) {
|
|
1051
|
-
var
|
|
1052
|
-
|
|
1053
|
-
|
|
1028
|
+
var _a;
|
|
1029
|
+
|
|
1030
|
+
var resultComponentProps = isFunction(item.componentProps) ? (_a = item.componentProps) === null || _a === void 0 ? void 0 : _a.call(item, {}, item) : item.componentProps;
|
|
1031
|
+
|
|
1032
|
+
var _ref8 = resultComponentProps || {},
|
|
1033
|
+
optionOnly = _ref8.optionOnly,
|
|
1034
|
+
options = _ref8.options;
|
|
1054
1035
|
|
|
1055
1036
|
if (optionOnly && options) {
|
|
1056
1037
|
var dataIndex = item.dataIndex;
|
|
@@ -1062,6 +1043,13 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1062
1043
|
disabled: !!dataIndexData.includes(o === null || o === void 0 ? void 0 : o.value)
|
|
1063
1044
|
});
|
|
1064
1045
|
});
|
|
1046
|
+
|
|
1047
|
+
if (isFunction(item.componentProps)) {
|
|
1048
|
+
return Object.assign(Object.assign({}, item), {
|
|
1049
|
+
newOptions: newOptions
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1065
1053
|
return Object.assign(Object.assign({}, item), {
|
|
1066
1054
|
componentProps: Object.assign(Object.assign({}, item.componentProps), {
|
|
1067
1055
|
options: newOptions
|
|
@@ -1082,17 +1070,47 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1082
1070
|
var rColumns = hasDisableOptions ? DisableOptions : columns;
|
|
1083
1071
|
var localColumns = [sortOpen ? {
|
|
1084
1072
|
title: '排序',
|
|
1085
|
-
dataIndex: '
|
|
1073
|
+
dataIndex: '_sort',
|
|
1086
1074
|
width: 48,
|
|
1087
1075
|
maxWidth: 48,
|
|
1088
1076
|
className: 'drag-visible',
|
|
1089
1077
|
fixed: 'left',
|
|
1090
1078
|
render: function render(_, record) {
|
|
1091
1079
|
return /*#__PURE__*/React.createElement(DragHandle, {
|
|
1092
|
-
id: record[_rowKey] || record.id
|
|
1080
|
+
id: (record === null || record === void 0 ? void 0 : record[_rowKey]) || (record === null || record === void 0 ? void 0 : record.id)
|
|
1093
1081
|
});
|
|
1094
1082
|
}
|
|
1095
|
-
} : null
|
|
1083
|
+
} : null, indexCol ? isBoolean(indexCol) ? {
|
|
1084
|
+
title: '',
|
|
1085
|
+
dataIndex: '_index',
|
|
1086
|
+
width: 48,
|
|
1087
|
+
maxWidth: 48,
|
|
1088
|
+
ellipsis: true,
|
|
1089
|
+
fixed: 'left',
|
|
1090
|
+
render: function render(_, record, index) {
|
|
1091
|
+
var _a, _b, _c;
|
|
1092
|
+
|
|
1093
|
+
console.log(deepDataSourceRef.current, '--deepDataSourceRef.current', _rowKey);
|
|
1094
|
+
return ((_c = (_b = (_a = deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[record[_rowKey]]) === null || _b === void 0 ? void 0 : _b['_deepIds']) === null || _c === void 0 ? void 0 : _c.join('-')) || "".concat(index + 1);
|
|
1095
|
+
}
|
|
1096
|
+
} : Object.assign(Object.assign({
|
|
1097
|
+
title: '',
|
|
1098
|
+
dataIndex: '_index',
|
|
1099
|
+
width: 48,
|
|
1100
|
+
ellipsis: true,
|
|
1101
|
+
maxWidth: 48,
|
|
1102
|
+
fixed: 'left'
|
|
1103
|
+
}, indexCol || {}), {
|
|
1104
|
+
render: function render(_, record, index) {
|
|
1105
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1106
|
+
|
|
1107
|
+
if (isFunction(indexCol === null || indexCol === void 0 ? void 0 : indexCol.render)) {
|
|
1108
|
+
return (_a = indexCol === null || indexCol === void 0 ? void 0 : indexCol.render) === null || _a === void 0 ? void 0 : _a.call(indexCol, record, (_c = (_b = deepDataSourceRef.current) === null || _b === void 0 ? void 0 : _b[record[_rowKey]]) === null || _c === void 0 ? void 0 : _c['_deepIds']);
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
return ((_f = (_e = (_d = deepDataSourceRef.current) === null || _d === void 0 ? void 0 : _d[record[_rowKey]]) === null || _e === void 0 ? void 0 : _e['_deepIds']) === null || _f === void 0 ? void 0 : _f.join('-')) || "".concat(index + 1);
|
|
1112
|
+
}
|
|
1113
|
+
}) : null].concat(_toConsumableArray(rColumns), [useQuickOpetate ? {
|
|
1096
1114
|
title: '操作',
|
|
1097
1115
|
dataIndex: 'lm_edit_opetate',
|
|
1098
1116
|
width: 68,
|
|
@@ -1103,9 +1121,9 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1103
1121
|
options: Array.isArray(useQuickOpetate) ? useQuickOpetate : ['add', 'delete']
|
|
1104
1122
|
}
|
|
1105
1123
|
} : null]).filter(function (item) {
|
|
1106
|
-
return item;
|
|
1124
|
+
return item && (item === null || item === void 0 ? void 0 : item.show) !== false;
|
|
1107
1125
|
});
|
|
1108
|
-
localColumns = localColumns.map(function (item, index) {
|
|
1126
|
+
localColumns = localColumns === null || localColumns === void 0 ? void 0 : localColumns.map(function (item, index) {
|
|
1109
1127
|
return Object.assign(Object.assign({}, item), {
|
|
1110
1128
|
order: [null, undefined].includes(item.order) ? index : item.order
|
|
1111
1129
|
});
|
|
@@ -1130,8 +1148,19 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1130
1148
|
var mapColumns = function mapColumns(col, index) {
|
|
1131
1149
|
var _a, _b;
|
|
1132
1150
|
|
|
1133
|
-
if (!col.editable && !((_a = col.children) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
1134
|
-
|
|
1151
|
+
if (!col.editable && !((_a = col.children) === null || _a === void 0 ? void 0 : _a.length) && (col === null || col === void 0 ? void 0 : col.dataIndex) === '_sort') {
|
|
1152
|
+
var fn = col === null || col === void 0 ? void 0 : col.render;
|
|
1153
|
+
return Object.assign(Object.assign({}, col), {
|
|
1154
|
+
render: function render(text, record, i) {
|
|
1155
|
+
var _a;
|
|
1156
|
+
|
|
1157
|
+
return fn === null || fn === void 0 ? void 0 : fn((_a = dataSource[i]) === null || _a === void 0 ? void 0 : _a[col.dataIndex], dataSource[i], i);
|
|
1158
|
+
}
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
if (isEdit && (col === null || col === void 0 ? void 0 : col.render) && (col === null || col === void 0 ? void 0 : col.editable) === 'render') {
|
|
1163
|
+
delete col.render;
|
|
1135
1164
|
}
|
|
1136
1165
|
|
|
1137
1166
|
var newCol = Object.assign(Object.assign({}, col), {
|
|
@@ -1149,7 +1178,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1149
1178
|
editable: col.editable,
|
|
1150
1179
|
dataIndex: col.dataIndex,
|
|
1151
1180
|
itemProps: col.itemProps,
|
|
1152
|
-
|
|
1181
|
+
shouldUpdate: shouldUpdate,
|
|
1153
1182
|
isEdit: isEdit,
|
|
1154
1183
|
isHoverEdit: isHoverEdit,
|
|
1155
1184
|
handleAdd: handleAdd,
|
|
@@ -1157,8 +1186,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1157
1186
|
handleCopy: handleCopy,
|
|
1158
1187
|
editEnum: typeof col.editEnum === 'function' ? col.editEnum(record) : col.editEnum,
|
|
1159
1188
|
valueType: typeof col.valueType === 'function' ? col.valueType(record) : col.valueType,
|
|
1160
|
-
handleSave: handleSave
|
|
1161
|
-
reWriteOriginSource: reWriteOriginSource
|
|
1189
|
+
handleSave: handleSave
|
|
1162
1190
|
};
|
|
1163
1191
|
}
|
|
1164
1192
|
});
|
|
@@ -1170,7 +1198,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1170
1198
|
return newCol;
|
|
1171
1199
|
};
|
|
1172
1200
|
|
|
1173
|
-
var res = localColumns.map(function (col, index) {
|
|
1201
|
+
var res = localColumns === null || localColumns === void 0 ? void 0 : localColumns.map(function (col, index) {
|
|
1174
1202
|
return mapColumns(col, index);
|
|
1175
1203
|
});
|
|
1176
1204
|
return res;
|
|
@@ -1208,8 +1236,24 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1208
1236
|
useImperativeHandle(ref, function () {
|
|
1209
1237
|
return {
|
|
1210
1238
|
setRow: handleSave,
|
|
1211
|
-
|
|
1212
|
-
return
|
|
1239
|
+
getCheckboxRecords: function getCheckboxRecords() {
|
|
1240
|
+
return localRowSelectList.selectedRows;
|
|
1241
|
+
},
|
|
1242
|
+
deleteRowData: function deleteRowData(data) {
|
|
1243
|
+
return handleTableRowDelete(data);
|
|
1244
|
+
},
|
|
1245
|
+
addRowData: function addRowData(data, defaultValue, addInChild) {
|
|
1246
|
+
return addInChild === 'replace' ? handleTableRowReplace(data, defaultValue) : handleTableRowAdd(data, addInChild, defaultValue);
|
|
1247
|
+
},
|
|
1248
|
+
clearSelect: function clearSelect() {
|
|
1249
|
+
setLocalRowSelectList({
|
|
1250
|
+
selectedRows: []
|
|
1251
|
+
});
|
|
1252
|
+
},
|
|
1253
|
+
customSetCheckboxRecords: function customSetCheckboxRecords(value) {
|
|
1254
|
+
setLocalRowSelectList({
|
|
1255
|
+
selectedRows: value
|
|
1256
|
+
});
|
|
1213
1257
|
}
|
|
1214
1258
|
};
|
|
1215
1259
|
});
|
|
@@ -1238,14 +1282,17 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1238
1282
|
cell: MemoEditableCell
|
|
1239
1283
|
}, sortOpen ? {
|
|
1240
1284
|
wrapper: function wrapper(wrapperProps) {
|
|
1241
|
-
var _a;
|
|
1285
|
+
var _a, _b, _c;
|
|
1242
1286
|
|
|
1243
1287
|
return DraggableContainer(Object.assign(Object.assign({}, wrapperProps), {
|
|
1244
1288
|
virtual: virtual,
|
|
1245
1289
|
keys: (_a = dataSourceRef.current) === null || _a === void 0 ? void 0 : _a.map(function (item) {
|
|
1246
1290
|
return item[_rowKey];
|
|
1247
1291
|
}),
|
|
1248
|
-
|
|
1292
|
+
options: dataSourceRef.current,
|
|
1293
|
+
rowKey: _rowKey,
|
|
1294
|
+
onSortEnd: onSortEnd,
|
|
1295
|
+
tableWidth: (_c = (_b = tableWarpRef === null || tableWarpRef === void 0 ? void 0 : tableWarpRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width
|
|
1249
1296
|
}));
|
|
1250
1297
|
}
|
|
1251
1298
|
} : virtual ? {
|
|
@@ -1254,12 +1301,18 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1254
1301
|
header: {
|
|
1255
1302
|
row: colSortOpen ? colDraggableContainer : null
|
|
1256
1303
|
}
|
|
1304
|
+
},
|
|
1305
|
+
onRow: function onRow(record, index) {
|
|
1306
|
+
return {
|
|
1307
|
+
disabled: disabled
|
|
1308
|
+
};
|
|
1257
1309
|
}
|
|
1258
1310
|
}, resetProps));
|
|
1259
1311
|
|
|
1260
1312
|
if (colSortOpen) {
|
|
1261
1313
|
return /*#__PURE__*/React.createElement("div", {
|
|
1262
|
-
className: "lm_editTable_warpper"
|
|
1314
|
+
className: "lm_editTable_warpper",
|
|
1315
|
+
ref: tableWarpRef
|
|
1263
1316
|
}, /*#__PURE__*/React.createElement(DndContainer, {
|
|
1264
1317
|
move: onColSortEnd
|
|
1265
1318
|
}, /*#__PURE__*/React.createElement(SortableBoxCol, {
|
|
@@ -1267,74 +1320,76 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1267
1320
|
return [].concat(_toConsumableArray(acc), [item.dataIndex]);
|
|
1268
1321
|
}, [])
|
|
1269
1322
|
}, /*#__PURE__*/React.createElement(Table, Object.assign({}, config.current, {
|
|
1323
|
+
loading: loading,
|
|
1270
1324
|
size: size || 'small',
|
|
1271
1325
|
columns: resultColumns,
|
|
1272
1326
|
rowClassName: "editable-row",
|
|
1273
1327
|
bordered: true,
|
|
1274
1328
|
pagination: false,
|
|
1275
|
-
|
|
1276
|
-
rowSelection: !rowSelection ? undefined : {
|
|
1329
|
+
rowSelection: !rowSelection ? undefined : Object.assign(Object.assign({
|
|
1277
1330
|
fixed: true,
|
|
1278
1331
|
type: 'checkbox',
|
|
1279
|
-
columnWidth: 36
|
|
1280
|
-
|
|
1281
|
-
|
|
1332
|
+
columnWidth: 36
|
|
1333
|
+
}, rowSelection), {
|
|
1334
|
+
selectedRowKeys: (_a = localRowSelectList === null || localRowSelectList === void 0 ? void 0 : localRowSelectList.selectedRows) === null || _a === void 0 ? void 0 : _a.map(function (v) {
|
|
1335
|
+
return isObject(v) ? v[_rowKey] : v;
|
|
1282
1336
|
}),
|
|
1283
|
-
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
1284
|
-
|
|
1337
|
+
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
1338
|
+
setLocalRowSelectList(selectedRowKeys, selectedRows, info);
|
|
1285
1339
|
}
|
|
1286
|
-
},
|
|
1340
|
+
}),
|
|
1287
1341
|
dataSource: dataSource
|
|
1288
|
-
})))),
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
}
|
|
1295
|
-
}, /*#__PURE__*/React.createElement(PlusCircleOutlined, {
|
|
1296
|
-
className: "lmweb-plus"
|
|
1297
|
-
}), "\u65B0\u589E"));
|
|
1342
|
+
})))), /*#__PURE__*/React.createElement(BottomOpetateComponent, {
|
|
1343
|
+
disabled: disabled,
|
|
1344
|
+
isShowAddAction: isShowAddAction,
|
|
1345
|
+
recordCreatorProps: recordCreatorProps,
|
|
1346
|
+
handleAdd: handleAdd
|
|
1347
|
+
}));
|
|
1298
1348
|
} // @ts-ignore
|
|
1299
1349
|
|
|
1300
1350
|
|
|
1301
1351
|
return /*#__PURE__*/React.createElement("div", {
|
|
1302
|
-
className: "lm_editTable_warpper"
|
|
1352
|
+
className: "lm_editTable_warpper",
|
|
1353
|
+
ref: tableWarpRef
|
|
1303
1354
|
}, /*#__PURE__*/React.createElement(Table, Object.assign({}, config.current, {
|
|
1304
1355
|
size: size || 'small',
|
|
1305
1356
|
columns: resultColumns,
|
|
1306
1357
|
rowClassName: "editable-row",
|
|
1307
1358
|
bordered: true,
|
|
1359
|
+
loading: loading,
|
|
1308
1360
|
pagination: false,
|
|
1309
1361
|
// components={tableComponents}
|
|
1310
1362
|
expandable: (resetProps === null || resetProps === void 0 ? void 0 : resetProps.expandable) || {
|
|
1311
1363
|
expandedRowKeys: expandedRowKeys,
|
|
1312
1364
|
fixed: true,
|
|
1365
|
+
// indentSize: 0,
|
|
1366
|
+
expandIconColumnIndex: checkExpandIconColumnIndex({
|
|
1367
|
+
rowSelection: rowSelection,
|
|
1368
|
+
sortOpen: sortOpen,
|
|
1369
|
+
indexCol: indexCol
|
|
1370
|
+
}) || 0,
|
|
1313
1371
|
onExpandedRowsChange: function onExpandedRowsChange(expandedRows) {
|
|
1314
1372
|
return setExpandedRowKeys(expandedRows);
|
|
1315
1373
|
}
|
|
1316
1374
|
},
|
|
1317
|
-
rowSelection: !rowSelection ? undefined : {
|
|
1375
|
+
rowSelection: !rowSelection ? undefined : Object.assign(Object.assign({
|
|
1318
1376
|
fixed: true,
|
|
1319
1377
|
type: 'checkbox',
|
|
1320
|
-
columnWidth: 36
|
|
1321
|
-
|
|
1322
|
-
|
|
1378
|
+
columnWidth: 36
|
|
1379
|
+
}, rowSelection), {
|
|
1380
|
+
selectedRowKeys: (_b = localRowSelectList === null || localRowSelectList === void 0 ? void 0 : localRowSelectList.selectedRows) === null || _b === void 0 ? void 0 : _b.map(function (v) {
|
|
1381
|
+
return isObject(v) ? v[_rowKey] : v;
|
|
1323
1382
|
}),
|
|
1324
|
-
onChange: function onChange(selectedRowKeys, selectedRows) {
|
|
1325
|
-
|
|
1383
|
+
onChange: function onChange(selectedRowKeys, selectedRows, info) {
|
|
1384
|
+
setLocalRowSelectList(selectedRowKeys, selectedRows, info);
|
|
1326
1385
|
}
|
|
1327
|
-
},
|
|
1386
|
+
}),
|
|
1328
1387
|
dataSource: dataSource
|
|
1329
|
-
})),
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
}, (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.style) || {})
|
|
1336
|
-
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
1337
|
-
type: "lmweb-plus"
|
|
1338
|
-
}), (recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.creatorButtonText) || '新增'));
|
|
1388
|
+
})), /*#__PURE__*/React.createElement(BottomOpetateComponent, {
|
|
1389
|
+
disabled: disabled,
|
|
1390
|
+
isShowAddAction: isShowAddAction,
|
|
1391
|
+
recordCreatorProps: recordCreatorProps,
|
|
1392
|
+
handleAdd: handleAdd
|
|
1393
|
+
}));
|
|
1339
1394
|
});
|
|
1340
1395
|
export default /*#__PURE__*/memo(EditTable);
|