linkmore-design 1.1.36 → 1.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/LmEditTable/rowSort/DndContainerRow.d.ts +1 -0
- package/dist/index.umd.css +7 -0
- package/dist/index.umd.js +33 -12
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +21 -21
- package/dist/variables.css +0 -3
- package/es/CustomTableOption/cardSort.js +7 -2
- package/es/CustomTableOption/index.js +15 -5
- package/es/LmEditTable/EditTable.js +3 -1
- package/es/LmEditTable/rowSort/DndContainerRow.d.ts +1 -0
- package/es/LmEditTable/rowSort/DndContainerRow.js +9 -3
- package/es/LmEditTable/rowSort/index.css +6 -0
- package/es/LmEditTable/style/index.css +0 -3
- package/es/LmEditTable/style/variables.css +0 -3
- package/es/LmUpload/fns/index.js +1 -1
- package/es/styles/variables.css +0 -3
- package/lib/CustomTableOption/cardSort.js +7 -2
- package/lib/CustomTableOption/index.js +15 -5
- package/lib/LmEditTable/EditTable.js +3 -1
- package/lib/LmEditTable/rowSort/DndContainerRow.d.ts +1 -0
- package/lib/LmEditTable/rowSort/DndContainerRow.js +11 -3
- package/lib/LmEditTable/rowSort/index.css +6 -0
- package/lib/LmEditTable/style/index.css +0 -3
- package/lib/LmEditTable/style/variables.css +0 -3
- package/lib/LmUpload/fns/index.js +1 -1
- package/lib/styles/variables.css +0 -3
- package/package.json +1 -1
package/dist/variables.css
CHANGED
|
@@ -9822,9 +9822,6 @@ p {
|
|
|
9822
9822
|
.lm_editTable_warpper .lm_table_quickcopy .anticon {
|
|
9823
9823
|
color: var(--text-color);
|
|
9824
9824
|
}
|
|
9825
|
-
.lm_editTable_warpper .ant-table-body {
|
|
9826
|
-
scroll-behavior: smooth;
|
|
9827
|
-
}
|
|
9828
9825
|
.lm_editTable_warpper .icon_drag {
|
|
9829
9826
|
color: var(--tip-text-color);
|
|
9830
9827
|
}
|
|
@@ -47,7 +47,8 @@ var FilterSort = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
47
47
|
card = _ref$card === void 0 ? [] : _ref$card,
|
|
48
48
|
_ref$cardStateValue = _ref.cardStateValue,
|
|
49
49
|
cardStateValue = _ref$cardStateValue === void 0 ? {} : _ref$cardStateValue,
|
|
50
|
-
showPromptNum = _ref.showPromptNum
|
|
50
|
+
showPromptNum = _ref.showPromptNum,
|
|
51
|
+
changeStatusFn = _ref.changeStatusFn;
|
|
51
52
|
|
|
52
53
|
var _useState = useState([]),
|
|
53
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -128,6 +129,7 @@ var FilterSort = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
128
129
|
});
|
|
129
130
|
});
|
|
130
131
|
});
|
|
132
|
+
changeStatusFn === null || changeStatusFn === void 0 ? void 0 : changeStatusFn();
|
|
131
133
|
}
|
|
132
134
|
};
|
|
133
135
|
/** 添加是否显示 */
|
|
@@ -144,6 +146,7 @@ var FilterSort = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
144
146
|
return Object.assign({}, item);
|
|
145
147
|
});
|
|
146
148
|
setLocalCard(resultColumns);
|
|
149
|
+
changeStatusFn === null || changeStatusFn === void 0 ? void 0 : changeStatusFn();
|
|
147
150
|
};
|
|
148
151
|
/** 切换是否全选 */
|
|
149
152
|
|
|
@@ -155,6 +158,7 @@ var FilterSort = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
155
158
|
});
|
|
156
159
|
});
|
|
157
160
|
setLocalCard(resultColumns);
|
|
161
|
+
changeStatusFn === null || changeStatusFn === void 0 ? void 0 : changeStatusFn();
|
|
158
162
|
};
|
|
159
163
|
|
|
160
164
|
useImperativeHandle(ref, function () {
|
|
@@ -201,7 +205,8 @@ var FilterSort = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
201
205
|
checked: isCheckAll.checkAll
|
|
202
206
|
}, "\u5168\u9009"), /*#__PURE__*/React.createElement("span", {
|
|
203
207
|
onClick: function onClick() {
|
|
204
|
-
|
|
208
|
+
setLocalCard(card);
|
|
209
|
+
changeStatusFn === null || changeStatusFn === void 0 ? void 0 : changeStatusFn();
|
|
205
210
|
}
|
|
206
211
|
}, "\u91CD\u7F6E")), !!(sortMenu === null || sortMenu === void 0 ? void 0 : sortMenu.length) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DndContext, {
|
|
207
212
|
sensors: sensors,
|
|
@@ -29,6 +29,9 @@ var LMCustomTableOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
29
29
|
var className = props.className,
|
|
30
30
|
_props$tooltip = props.tooltip,
|
|
31
31
|
tooltip = _props$tooltip === void 0 ? {} : _props$tooltip;
|
|
32
|
+
/** check is change */
|
|
33
|
+
|
|
34
|
+
var isChangeRef = useRef(false);
|
|
32
35
|
var filterRef = useRef(null);
|
|
33
36
|
var columnsRef = useRef(null);
|
|
34
37
|
var cardRef = useRef(null); // const sizeRef = useRef(null)
|
|
@@ -59,6 +62,12 @@ var LMCustomTableOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
59
62
|
setVisible(true);
|
|
60
63
|
};
|
|
61
64
|
|
|
65
|
+
var changeStatusFn = function changeStatusFn() {
|
|
66
|
+
if (!isChangeRef.current) {
|
|
67
|
+
isChangeRef.current = true;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
|
|
62
71
|
useEffect(function () {
|
|
63
72
|
setLmOptions({
|
|
64
73
|
filter: props.filter || [],
|
|
@@ -86,7 +95,7 @@ var LMCustomTableOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
86
95
|
return (item === null || item === void 0 ? void 0 : item.show) !== false;
|
|
87
96
|
})) || [];
|
|
88
97
|
|
|
89
|
-
if (effectCardData.length > (((_g = props.recommendNumObj) === null || _g === void 0 ? void 0 : _g.card) || 10)) {
|
|
98
|
+
if (effectCardData.length > (((_g = props.recommendNumObj) === null || _g === void 0 ? void 0 : _g.card) || 10) && !!isChangeRef.current) {
|
|
90
99
|
Modal.confirm({
|
|
91
100
|
title: '当前选择的卡片字段数量会导致卡片高度过高,是否继续?',
|
|
92
101
|
icon: /*#__PURE__*/React.createElement(ExclamationCircleOutlined, null),
|
|
@@ -129,7 +138,7 @@ var LMCustomTableOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
129
138
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_Tooltip, Object.assign({}, tooltip), /*#__PURE__*/React.createElement(Button, {
|
|
130
139
|
onClick: openSetting,
|
|
131
140
|
icon: /*#__PURE__*/React.createElement(IconFont, {
|
|
132
|
-
type:
|
|
141
|
+
type: "lmweb-setting"
|
|
133
142
|
})
|
|
134
143
|
})), /*#__PURE__*/React.createElement(Drawer, {
|
|
135
144
|
className: classNames(className, prefixCls),
|
|
@@ -171,6 +180,7 @@ var LMCustomTableOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
171
180
|
}, /*#__PURE__*/React.createElement(CardSort, {
|
|
172
181
|
ref: cardRef,
|
|
173
182
|
card: lmOptions.card,
|
|
183
|
+
changeStatusFn: changeStatusFn,
|
|
174
184
|
showPromptNum: ((_d = props.recommendNumObj) === null || _d === void 0 ? void 0 : _d.card) || 10
|
|
175
185
|
})), /*#__PURE__*/React.createElement(TabPane, {
|
|
176
186
|
tab: "\u5176\u4ED6",
|
|
@@ -182,11 +192,11 @@ var LMCustomTableOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
182
192
|
size: e.target.value
|
|
183
193
|
}));
|
|
184
194
|
},
|
|
185
|
-
className:
|
|
195
|
+
className: "lm_size_radio_group",
|
|
186
196
|
value: lmOptions.size
|
|
187
197
|
}, optionsWithDisabled.map(function (item) {
|
|
188
198
|
return /*#__PURE__*/React.createElement("div", {
|
|
189
|
-
className:
|
|
199
|
+
className: "lm_custom_size_warp",
|
|
190
200
|
key: item.value
|
|
191
201
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
192
202
|
onClick: function onClick() {
|
|
@@ -202,7 +212,7 @@ var LMCustomTableOption = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
202
212
|
value: item.value
|
|
203
213
|
}, item.label));
|
|
204
214
|
})), /*#__PURE__*/React.createElement("div", {
|
|
205
|
-
className:
|
|
215
|
+
className: "save_setting"
|
|
206
216
|
}, /*#__PURE__*/React.createElement("span", null, "\u662F\u5426\u8BB0\u4F4F\u9875\u9762\u4F7F\u7528\u72B6\u6001"), /*#__PURE__*/React.createElement(Switch, {
|
|
207
217
|
checked: saveSetting,
|
|
208
218
|
onChange: setSaveSetting
|
|
@@ -766,6 +766,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
766
766
|
deepDataSourceRef.current = deepDataSourcePreKeys(dataSource, _rowKey);
|
|
767
767
|
var disabledDataSourceRowKeys = useRef(checkTableRowIsDisable(deepDataSourceRef.current, localDisabledRows.disabledRows, _rowKey));
|
|
768
768
|
disabledDataSourceRowKeys.current = checkTableRowIsDisable(deepDataSourceRef.current, localDisabledRows.disabledRows, _rowKey);
|
|
769
|
+
var columnsRef = useRef(columns);
|
|
769
770
|
var tableWarpRef = useRef(null);
|
|
770
771
|
var autoSizerRef = useRef(null);
|
|
771
772
|
var allFormListRef = useRef({});
|
|
@@ -1271,6 +1272,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1271
1272
|
var res = localColumns === null || localColumns === void 0 ? void 0 : localColumns.map(function (col, index) {
|
|
1272
1273
|
return mapColumns(col, index);
|
|
1273
1274
|
});
|
|
1275
|
+
columnsRef.current = res;
|
|
1274
1276
|
return res;
|
|
1275
1277
|
}, [columns, isAdd, sortOpen, useQuickOpetate, dataSource, _toConsumableArray(memoOptions)]);
|
|
1276
1278
|
|
|
@@ -1629,7 +1631,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1629
1631
|
onSortEnd: onSortEnd,
|
|
1630
1632
|
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,
|
|
1631
1633
|
tableHeight: (_e = (_d = tableWarpRef === null || tableWarpRef === void 0 ? void 0 : tableWarpRef.current) === null || _d === void 0 ? void 0 : _d.getBoundingClientRect()) === null || _e === void 0 ? void 0 : _e.height,
|
|
1632
|
-
columns: resultColumns
|
|
1634
|
+
columns: columnsRef.current || resultColumns
|
|
1633
1635
|
}));
|
|
1634
1636
|
}
|
|
1635
1637
|
} : virtual ? {
|
|
@@ -5,7 +5,9 @@ import React, { memo } from 'react';
|
|
|
5
5
|
import { DndContext, closestCenter, KeyboardSensor, PointerSensor, useSensor, useSensors, DragOverlay } from '@dnd-kit/core';
|
|
6
6
|
import { restrictToParentElement, restrictToVerticalAxis } from '@dnd-kit/modifiers';
|
|
7
7
|
import { sortableKeyboardCoordinates } from '@dnd-kit/sortable';
|
|
8
|
+
import { omit } from 'lodash';
|
|
8
9
|
import Table from '../EditTable';
|
|
10
|
+
import "./index.css";
|
|
9
11
|
var DragOver = /*#__PURE__*/React.memo(function (_ref) {
|
|
10
12
|
var instance = _ref.instance;
|
|
11
13
|
var isDragging = instance.isDragging,
|
|
@@ -16,19 +18,23 @@ var DragOver = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
16
18
|
var item = activeId && options.find(function (v) {
|
|
17
19
|
return v[rowKey] === activeId;
|
|
18
20
|
});
|
|
21
|
+
var filterCol = columns === null || columns === void 0 ? void 0 : columns.filter(function (item) {
|
|
22
|
+
return omit(item, 'onCell');
|
|
23
|
+
});
|
|
19
24
|
return /*#__PURE__*/React.createElement(DragOverlay, {
|
|
20
25
|
adjustScale: false
|
|
21
26
|
}, isDragging ? /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: "lm_editable_darg_item",
|
|
22
28
|
style: {
|
|
23
29
|
width: instance.tableWidth,
|
|
24
30
|
backgroundColor: '#fff',
|
|
25
31
|
overflowX: 'hidden'
|
|
26
32
|
}
|
|
27
33
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
28
|
-
columns:
|
|
34
|
+
columns: filterCol || [],
|
|
29
35
|
showHeader: false,
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
style: {
|
|
37
|
+
overflow: 'hidden'
|
|
32
38
|
},
|
|
33
39
|
pagination: false,
|
|
34
40
|
value: [item]
|
|
@@ -614,9 +614,6 @@ p {
|
|
|
614
614
|
.lm_editTable_warpper .lm_table_quickcopy .anticon {
|
|
615
615
|
color: var(--text-color);
|
|
616
616
|
}
|
|
617
|
-
.lm_editTable_warpper .ant-table-body {
|
|
618
|
-
scroll-behavior: smooth;
|
|
619
|
-
}
|
|
620
617
|
.lm_editTable_warpper .icon_drag {
|
|
621
618
|
color: var(--tip-text-color);
|
|
622
619
|
}
|
|
@@ -102,9 +102,6 @@
|
|
|
102
102
|
.lm_editTable_warpper .lm_table_quickcopy .anticon {
|
|
103
103
|
color: var(--text-color);
|
|
104
104
|
}
|
|
105
|
-
.lm_editTable_warpper .ant-table-body {
|
|
106
|
-
scroll-behavior: smooth;
|
|
107
|
-
}
|
|
108
105
|
.lm_editTable_warpper .icon_drag {
|
|
109
106
|
color: var(--tip-text-color);
|
|
110
107
|
}
|
package/es/LmUpload/fns/index.js
CHANGED
|
@@ -146,7 +146,7 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
146
146
|
});
|
|
147
147
|
doneFileUploadLen.current = [];
|
|
148
148
|
_context.next = 8;
|
|
149
|
-
return ossCallBack === null || ossCallBack === void 0 ? void 0 : ossCallBack(params);
|
|
149
|
+
return ossCallBack === null || ossCallBack === void 0 ? void 0 : ossCallBack(Array.isArray(params) ? params : [params]);
|
|
150
150
|
|
|
151
151
|
case 8:
|
|
152
152
|
res = _context.sent;
|
package/es/styles/variables.css
CHANGED
|
@@ -9822,9 +9822,6 @@ p {
|
|
|
9822
9822
|
.lm_editTable_warpper .lm_table_quickcopy .anticon {
|
|
9823
9823
|
color: var(--text-color);
|
|
9824
9824
|
}
|
|
9825
|
-
.lm_editTable_warpper .ant-table-body {
|
|
9826
|
-
scroll-behavior: smooth;
|
|
9827
|
-
}
|
|
9828
9825
|
.lm_editTable_warpper .icon_drag {
|
|
9829
9826
|
color: var(--tip-text-color);
|
|
9830
9827
|
}
|
|
@@ -66,7 +66,8 @@ var FilterSort = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
66
66
|
card = _ref$card === void 0 ? [] : _ref$card,
|
|
67
67
|
_ref$cardStateValue = _ref.cardStateValue,
|
|
68
68
|
cardStateValue = _ref$cardStateValue === void 0 ? {} : _ref$cardStateValue,
|
|
69
|
-
showPromptNum = _ref.showPromptNum
|
|
69
|
+
showPromptNum = _ref.showPromptNum,
|
|
70
|
+
changeStatusFn = _ref.changeStatusFn;
|
|
70
71
|
|
|
71
72
|
var _useState = (0, _react.useState)([]),
|
|
72
73
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -147,6 +148,7 @@ var FilterSort = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
147
148
|
});
|
|
148
149
|
});
|
|
149
150
|
});
|
|
151
|
+
changeStatusFn === null || changeStatusFn === void 0 ? void 0 : changeStatusFn();
|
|
150
152
|
}
|
|
151
153
|
};
|
|
152
154
|
/** 添加是否显示 */
|
|
@@ -163,6 +165,7 @@ var FilterSort = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
163
165
|
return Object.assign({}, item);
|
|
164
166
|
});
|
|
165
167
|
setLocalCard(resultColumns);
|
|
168
|
+
changeStatusFn === null || changeStatusFn === void 0 ? void 0 : changeStatusFn();
|
|
166
169
|
};
|
|
167
170
|
/** 切换是否全选 */
|
|
168
171
|
|
|
@@ -174,6 +177,7 @@ var FilterSort = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
174
177
|
});
|
|
175
178
|
});
|
|
176
179
|
setLocalCard(resultColumns);
|
|
180
|
+
changeStatusFn === null || changeStatusFn === void 0 ? void 0 : changeStatusFn();
|
|
177
181
|
};
|
|
178
182
|
|
|
179
183
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
@@ -220,7 +224,8 @@ var FilterSort = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
220
224
|
checked: isCheckAll.checkAll
|
|
221
225
|
}, "\u5168\u9009"), /*#__PURE__*/_react.default.createElement("span", {
|
|
222
226
|
onClick: function onClick() {
|
|
223
|
-
|
|
227
|
+
setLocalCard(card);
|
|
228
|
+
changeStatusFn === null || changeStatusFn === void 0 ? void 0 : changeStatusFn();
|
|
224
229
|
}
|
|
225
230
|
}, "\u91CD\u7F6E")), !!(sortMenu === null || sortMenu === void 0 ? void 0 : sortMenu.length) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_core.DndContext, {
|
|
226
231
|
sensors: sensors,
|
|
@@ -50,6 +50,9 @@ var LMCustomTableOption = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
|
|
|
50
50
|
var className = props.className,
|
|
51
51
|
_props$tooltip = props.tooltip,
|
|
52
52
|
tooltip = _props$tooltip === void 0 ? {} : _props$tooltip;
|
|
53
|
+
/** check is change */
|
|
54
|
+
|
|
55
|
+
var isChangeRef = (0, _react.useRef)(false);
|
|
53
56
|
var filterRef = (0, _react.useRef)(null);
|
|
54
57
|
var columnsRef = (0, _react.useRef)(null);
|
|
55
58
|
var cardRef = (0, _react.useRef)(null); // const sizeRef = useRef(null)
|
|
@@ -80,6 +83,12 @@ var LMCustomTableOption = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
|
|
|
80
83
|
setVisible(true);
|
|
81
84
|
};
|
|
82
85
|
|
|
86
|
+
var changeStatusFn = function changeStatusFn() {
|
|
87
|
+
if (!isChangeRef.current) {
|
|
88
|
+
isChangeRef.current = true;
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
83
92
|
(0, _react.useEffect)(function () {
|
|
84
93
|
setLmOptions({
|
|
85
94
|
filter: props.filter || [],
|
|
@@ -107,7 +116,7 @@ var LMCustomTableOption = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
|
|
|
107
116
|
return (item === null || item === void 0 ? void 0 : item.show) !== false;
|
|
108
117
|
})) || [];
|
|
109
118
|
|
|
110
|
-
if (effectCardData.length > (((_g = props.recommendNumObj) === null || _g === void 0 ? void 0 : _g.card) || 10)) {
|
|
119
|
+
if (effectCardData.length > (((_g = props.recommendNumObj) === null || _g === void 0 ? void 0 : _g.card) || 10) && !!isChangeRef.current) {
|
|
111
120
|
_linkmoreDesign.Modal.confirm({
|
|
112
121
|
title: '当前选择的卡片字段数量会导致卡片高度过高,是否继续?',
|
|
113
122
|
icon: /*#__PURE__*/_react.default.createElement(_icons.ExclamationCircleOutlined, null),
|
|
@@ -150,7 +159,7 @@ var LMCustomTableOption = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
|
|
|
150
159
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_tooltip.default, Object.assign({}, tooltip), /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Button, {
|
|
151
160
|
onClick: openSetting,
|
|
152
161
|
icon: /*#__PURE__*/_react.default.createElement(_linkmoreDesign.IconFont, {
|
|
153
|
-
type:
|
|
162
|
+
type: "lmweb-setting"
|
|
154
163
|
})
|
|
155
164
|
})), /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Drawer, {
|
|
156
165
|
className: (0, _classnames.default)(className, prefixCls),
|
|
@@ -192,6 +201,7 @@ var LMCustomTableOption = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
|
|
|
192
201
|
}, /*#__PURE__*/_react.default.createElement(_cardSort.default, {
|
|
193
202
|
ref: cardRef,
|
|
194
203
|
card: lmOptions.card,
|
|
204
|
+
changeStatusFn: changeStatusFn,
|
|
195
205
|
showPromptNum: ((_d = props.recommendNumObj) === null || _d === void 0 ? void 0 : _d.card) || 10
|
|
196
206
|
})), /*#__PURE__*/_react.default.createElement(TabPane, {
|
|
197
207
|
tab: "\u5176\u4ED6",
|
|
@@ -203,11 +213,11 @@ var LMCustomTableOption = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
|
|
|
203
213
|
size: e.target.value
|
|
204
214
|
}));
|
|
205
215
|
},
|
|
206
|
-
className:
|
|
216
|
+
className: "lm_size_radio_group",
|
|
207
217
|
value: lmOptions.size
|
|
208
218
|
}, optionsWithDisabled.map(function (item) {
|
|
209
219
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
210
|
-
className:
|
|
220
|
+
className: "lm_custom_size_warp",
|
|
211
221
|
key: item.value
|
|
212
222
|
}, /*#__PURE__*/_react.default.createElement(_linkmoreDesign.IconFont, {
|
|
213
223
|
onClick: function onClick() {
|
|
@@ -223,7 +233,7 @@ var LMCustomTableOption = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
|
|
|
223
233
|
value: item.value
|
|
224
234
|
}, item.label));
|
|
225
235
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
226
|
-
className:
|
|
236
|
+
className: "save_setting"
|
|
227
237
|
}, /*#__PURE__*/_react.default.createElement("span", null, "\u662F\u5426\u8BB0\u4F4F\u9875\u9762\u4F7F\u7528\u72B6\u6001"), /*#__PURE__*/_react.default.createElement(_linkmoreDesign.Switch, {
|
|
228
238
|
checked: saveSetting,
|
|
229
239
|
onChange: setSaveSetting
|
|
@@ -800,6 +800,7 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
800
800
|
deepDataSourceRef.current = (0, _util.deepDataSourcePreKeys)(dataSource, _rowKey);
|
|
801
801
|
var disabledDataSourceRowKeys = (0, _react.useRef)((0, _util.checkTableRowIsDisable)(deepDataSourceRef.current, localDisabledRows.disabledRows, _rowKey));
|
|
802
802
|
disabledDataSourceRowKeys.current = (0, _util.checkTableRowIsDisable)(deepDataSourceRef.current, localDisabledRows.disabledRows, _rowKey);
|
|
803
|
+
var columnsRef = (0, _react.useRef)(columns);
|
|
803
804
|
var tableWarpRef = (0, _react.useRef)(null);
|
|
804
805
|
var autoSizerRef = (0, _react.useRef)(null);
|
|
805
806
|
var allFormListRef = (0, _react.useRef)({});
|
|
@@ -1305,6 +1306,7 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1305
1306
|
var res = localColumns === null || localColumns === void 0 ? void 0 : localColumns.map(function (col, index) {
|
|
1306
1307
|
return mapColumns(col, index);
|
|
1307
1308
|
});
|
|
1309
|
+
columnsRef.current = res;
|
|
1308
1310
|
return res;
|
|
1309
1311
|
}, [columns, isAdd, sortOpen, useQuickOpetate, dataSource, (0, _toConsumableArray2.default)(memoOptions)]);
|
|
1310
1312
|
|
|
@@ -1662,7 +1664,7 @@ var EditTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1662
1664
|
onSortEnd: onSortEnd,
|
|
1663
1665
|
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,
|
|
1664
1666
|
tableHeight: (_e = (_d = tableWarpRef === null || tableWarpRef === void 0 ? void 0 : tableWarpRef.current) === null || _d === void 0 ? void 0 : _d.getBoundingClientRect()) === null || _e === void 0 ? void 0 : _e.height,
|
|
1665
|
-
columns: resultColumns
|
|
1667
|
+
columns: columnsRef.current || resultColumns
|
|
1666
1668
|
}));
|
|
1667
1669
|
}
|
|
1668
1670
|
} : virtual ? {
|
|
@@ -19,8 +19,12 @@ var _modifiers = require("@dnd-kit/modifiers");
|
|
|
19
19
|
|
|
20
20
|
var _sortable = require("@dnd-kit/sortable");
|
|
21
21
|
|
|
22
|
+
var _lodash = require("lodash");
|
|
23
|
+
|
|
22
24
|
var _EditTable = _interopRequireDefault(require("../EditTable"));
|
|
23
25
|
|
|
26
|
+
require("./index.css");
|
|
27
|
+
|
|
24
28
|
/* eslint-disable no-unused-vars */
|
|
25
29
|
var DragOver = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
26
30
|
var instance = _ref.instance;
|
|
@@ -32,19 +36,23 @@ var DragOver = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
32
36
|
var item = activeId && options.find(function (v) {
|
|
33
37
|
return v[rowKey] === activeId;
|
|
34
38
|
});
|
|
39
|
+
var filterCol = columns === null || columns === void 0 ? void 0 : columns.filter(function (item) {
|
|
40
|
+
return (0, _lodash.omit)(item, 'onCell');
|
|
41
|
+
});
|
|
35
42
|
return /*#__PURE__*/_react.default.createElement(_core.DragOverlay, {
|
|
36
43
|
adjustScale: false
|
|
37
44
|
}, isDragging ? /*#__PURE__*/_react.default.createElement("div", {
|
|
45
|
+
className: "lm_editable_darg_item",
|
|
38
46
|
style: {
|
|
39
47
|
width: instance.tableWidth,
|
|
40
48
|
backgroundColor: '#fff',
|
|
41
49
|
overflowX: 'hidden'
|
|
42
50
|
}
|
|
43
51
|
}, /*#__PURE__*/_react.default.createElement(_EditTable.default, {
|
|
44
|
-
columns:
|
|
52
|
+
columns: filterCol || [],
|
|
45
53
|
showHeader: false,
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
style: {
|
|
55
|
+
overflow: 'hidden'
|
|
48
56
|
},
|
|
49
57
|
pagination: false,
|
|
50
58
|
value: [item]
|
|
@@ -614,9 +614,6 @@ p {
|
|
|
614
614
|
.lm_editTable_warpper .lm_table_quickcopy .anticon {
|
|
615
615
|
color: var(--text-color);
|
|
616
616
|
}
|
|
617
|
-
.lm_editTable_warpper .ant-table-body {
|
|
618
|
-
scroll-behavior: smooth;
|
|
619
|
-
}
|
|
620
617
|
.lm_editTable_warpper .icon_drag {
|
|
621
618
|
color: var(--tip-text-color);
|
|
622
619
|
}
|
|
@@ -102,9 +102,6 @@
|
|
|
102
102
|
.lm_editTable_warpper .lm_table_quickcopy .anticon {
|
|
103
103
|
color: var(--text-color);
|
|
104
104
|
}
|
|
105
|
-
.lm_editTable_warpper .ant-table-body {
|
|
106
|
-
scroll-behavior: smooth;
|
|
107
|
-
}
|
|
108
105
|
.lm_editTable_warpper .icon_drag {
|
|
109
106
|
color: var(--tip-text-color);
|
|
110
107
|
}
|
|
@@ -158,7 +158,7 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
158
158
|
});
|
|
159
159
|
doneFileUploadLen.current = [];
|
|
160
160
|
_context.next = 8;
|
|
161
|
-
return ossCallBack === null || ossCallBack === void 0 ? void 0 : ossCallBack(params);
|
|
161
|
+
return ossCallBack === null || ossCallBack === void 0 ? void 0 : ossCallBack(Array.isArray(params) ? params : [params]);
|
|
162
162
|
|
|
163
163
|
case 8:
|
|
164
164
|
res = _context.sent;
|
package/lib/styles/variables.css
CHANGED
|
@@ -9822,9 +9822,6 @@ p {
|
|
|
9822
9822
|
.lm_editTable_warpper .lm_table_quickcopy .anticon {
|
|
9823
9823
|
color: var(--text-color);
|
|
9824
9824
|
}
|
|
9825
|
-
.lm_editTable_warpper .ant-table-body {
|
|
9826
|
-
scroll-behavior: smooth;
|
|
9827
|
-
}
|
|
9828
9825
|
.lm_editTable_warpper .icon_drag {
|
|
9829
9826
|
color: var(--tip-text-color);
|
|
9830
9827
|
}
|