linkmore-design 1.1.35 → 1.1.37
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 +114 -88
- package/dist/index.umd.min.css +1 -1
- package/dist/index.umd.min.js +2 -2
- package/dist/variables.css +0 -3
- package/es/LmEditTable/EditTable.js +3 -1
- package/es/LmEditTable/rowSort/DndContainerRow.d.ts +1 -0
- package/es/LmEditTable/rowSort/DndContainerRow.js +4 -2
- 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 +90 -72
- package/es/styles/variables.css +0 -3
- package/lib/LmEditTable/EditTable.js +3 -1
- package/lib/LmEditTable/rowSort/DndContainerRow.d.ts +1 -0
- package/lib/LmEditTable/rowSort/DndContainerRow.js +5 -2
- 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 +90 -72
- 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
|
}
|
|
@@ -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 ? {
|
|
@@ -6,6 +6,7 @@ import { DndContext, closestCenter, KeyboardSensor, PointerSensor, useSensor, us
|
|
|
6
6
|
import { restrictToParentElement, restrictToVerticalAxis } from '@dnd-kit/modifiers';
|
|
7
7
|
import { sortableKeyboardCoordinates } from '@dnd-kit/sortable';
|
|
8
8
|
import Table from '../EditTable';
|
|
9
|
+
import "./index.css";
|
|
9
10
|
var DragOver = /*#__PURE__*/React.memo(function (_ref) {
|
|
10
11
|
var instance = _ref.instance;
|
|
11
12
|
var isDragging = instance.isDragging,
|
|
@@ -19,6 +20,7 @@ var DragOver = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
19
20
|
return /*#__PURE__*/React.createElement(DragOverlay, {
|
|
20
21
|
adjustScale: false
|
|
21
22
|
}, isDragging ? /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: "lm_editable_darg_item",
|
|
22
24
|
style: {
|
|
23
25
|
width: instance.tableWidth,
|
|
24
26
|
backgroundColor: '#fff',
|
|
@@ -27,8 +29,8 @@ var DragOver = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
27
29
|
}, /*#__PURE__*/React.createElement(Table, {
|
|
28
30
|
columns: columns || [],
|
|
29
31
|
showHeader: false,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
style: {
|
|
33
|
+
overflow: 'hidden'
|
|
32
34
|
},
|
|
33
35
|
pagination: false,
|
|
34
36
|
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
|
@@ -119,29 +119,47 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
119
119
|
}, [getFileList, props]); // 上传成功事件: File, fileParams
|
|
120
120
|
|
|
121
121
|
var uploadSuccess = useCallback(function (file, params, ossCallBack) {
|
|
122
|
-
|
|
122
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
123
|
+
var _a, _b, fileList, res;
|
|
123
124
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
126
|
+
while (1) {
|
|
127
|
+
switch (_context.prev = _context.next) {
|
|
128
|
+
case 0:
|
|
129
|
+
fileList = [].concat(_toConsumableArray(Array.isArray(params) ? params : [params]), _toConsumableArray(getFileList()));
|
|
130
|
+
dispatch({
|
|
131
|
+
type: 'changeFileList',
|
|
132
|
+
fileList: fileList
|
|
133
|
+
});
|
|
134
|
+
dispatch({
|
|
135
|
+
type: 'changePercent',
|
|
136
|
+
percent: null
|
|
137
|
+
}); // 上传事件:抛出 file: 文件 filelist: 文件列表 event: 上传进度信息
|
|
133
138
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
(_a = props.onSuccess) === null || _a === void 0 ? void 0 : _a.call(props, {
|
|
140
|
+
file: file,
|
|
141
|
+
fileList: fileList
|
|
142
|
+
});
|
|
143
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
144
|
+
file: file,
|
|
145
|
+
fileList: fileList
|
|
146
|
+
});
|
|
147
|
+
doneFileUploadLen.current = [];
|
|
148
|
+
_context.next = 8;
|
|
149
|
+
return ossCallBack === null || ossCallBack === void 0 ? void 0 : ossCallBack(params);
|
|
150
|
+
|
|
151
|
+
case 8:
|
|
152
|
+
res = _context.sent;
|
|
153
|
+
(_b = props.onCallBack) === null || _b === void 0 ? void 0 : _b.call(props, res);
|
|
154
|
+
|
|
155
|
+
case 10:
|
|
156
|
+
case "end":
|
|
157
|
+
return _context.stop();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}, _callee);
|
|
161
|
+
}));
|
|
162
|
+
}, [getFileList, props.onSuccess, props.onCallBack, onChange, dispatch, doneFileUploadLen.current]); // 上传进度事件
|
|
145
163
|
|
|
146
164
|
var uploadProgress = useCallback(function (file, _ref2) {
|
|
147
165
|
var progress = _ref2.progress,
|
|
@@ -188,14 +206,14 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
188
206
|
}, [props.onError, getFileList, onChange, doneFileUploadLen.current]); // 上传至ali-oss
|
|
189
207
|
|
|
190
208
|
var uploadOss = useCallback(function (file) {
|
|
191
|
-
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
209
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
192
210
|
var _ossConfig, _ossConfig$dir, filePath, shortlink, _ossConfig$region, region, accessKeyId, accessKeySecret, stsToken, _ossConfig$bucket, bucket, ossCallBack, client, timestamp, fileName, pathName, url, params;
|
|
193
211
|
|
|
194
|
-
return _regeneratorRuntime().wrap(function
|
|
212
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
195
213
|
while (1) {
|
|
196
|
-
switch (
|
|
214
|
+
switch (_context2.prev = _context2.next) {
|
|
197
215
|
case 0:
|
|
198
|
-
|
|
216
|
+
_context2.prev = 0;
|
|
199
217
|
_ossConfig = ossConfig(), _ossConfig$dir = _ossConfig.dir, filePath = _ossConfig$dir === void 0 ? '/BizFile/4595/Supplier/' : _ossConfig$dir, shortlink = _ossConfig.shortlink, _ossConfig$region = _ossConfig.region, region = _ossConfig$region === void 0 ? 'oss-cn-hangzhou' : _ossConfig$region, accessKeyId = _ossConfig.accessKeyId, accessKeySecret = _ossConfig.accessKeySecret, stsToken = _ossConfig.stsToken, _ossConfig$bucket = _ossConfig.bucket, bucket = _ossConfig$bucket === void 0 ? 'linkmore-scm-test' : _ossConfig$bucket, ossCallBack = _ossConfig.ossCallBack;
|
|
200
218
|
client = new OSS({
|
|
201
219
|
region: region,
|
|
@@ -208,7 +226,7 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
208
226
|
fileName = "".concat(timestamp, "-").concat(file.name);
|
|
209
227
|
pathName = filePath.slice(-1) === '/' ? "".concat(filePath).concat(fileName) : "".concat(filePath, "/").concat(fileName);
|
|
210
228
|
url = "".concat(shortlink).concat(pathName) || '';
|
|
211
|
-
|
|
229
|
+
_context2.next = 9;
|
|
212
230
|
return client.multipartUpload(pathName, file, {
|
|
213
231
|
// 获取分片上传进度、断点和返回值。
|
|
214
232
|
progress: function progress(_progress, checkPoint, result) {
|
|
@@ -245,23 +263,23 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
245
263
|
}
|
|
246
264
|
}
|
|
247
265
|
|
|
248
|
-
|
|
266
|
+
_context2.next = 17;
|
|
249
267
|
break;
|
|
250
268
|
|
|
251
269
|
case 14:
|
|
252
|
-
|
|
253
|
-
|
|
270
|
+
_context2.prev = 14;
|
|
271
|
+
_context2.t0 = _context2["catch"](0);
|
|
254
272
|
uploadError({
|
|
255
|
-
error:
|
|
273
|
+
error: _context2.t0,
|
|
256
274
|
file: file
|
|
257
275
|
});
|
|
258
276
|
|
|
259
277
|
case 17:
|
|
260
278
|
case "end":
|
|
261
|
-
return
|
|
279
|
+
return _context2.stop();
|
|
262
280
|
}
|
|
263
281
|
}
|
|
264
|
-
},
|
|
282
|
+
}, _callee2, null, [[0, 14]]);
|
|
265
283
|
}));
|
|
266
284
|
}, [multiple, ossConfig, uploadProgress, props.fileConfig, uploadSuccess, uploadError, fileUploadLen.current, doneFileUploadLen.current]); // 自定义使用外部上传
|
|
267
285
|
|
|
@@ -281,53 +299,53 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
281
299
|
}, [enabledOss, uploadOss, customUpload]); // 检测完成, 执行外部 `beforeUpload` 事件
|
|
282
300
|
|
|
283
301
|
var checkOver = useCallback(function (file) {
|
|
284
|
-
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
302
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
285
303
|
var res, newFile;
|
|
286
|
-
return _regeneratorRuntime().wrap(function
|
|
304
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
287
305
|
while (1) {
|
|
288
|
-
switch (
|
|
306
|
+
switch (_context3.prev = _context3.next) {
|
|
289
307
|
case 0:
|
|
290
308
|
if (props === null || props === void 0 ? void 0 : props.beforeUpload) {
|
|
291
|
-
|
|
309
|
+
_context3.next = 3;
|
|
292
310
|
break;
|
|
293
311
|
}
|
|
294
312
|
|
|
295
313
|
uploadFile(file);
|
|
296
|
-
return
|
|
314
|
+
return _context3.abrupt("return");
|
|
297
315
|
|
|
298
316
|
case 3:
|
|
299
317
|
res = props.beforeUpload(file, getFileList()); // Promise
|
|
300
318
|
|
|
301
319
|
if (!(res === null || res === void 0 ? void 0 : res.then)) {
|
|
302
|
-
|
|
320
|
+
_context3.next = 16;
|
|
303
321
|
break;
|
|
304
322
|
}
|
|
305
323
|
|
|
306
|
-
|
|
307
|
-
|
|
324
|
+
_context3.prev = 5;
|
|
325
|
+
_context3.next = 8;
|
|
308
326
|
return res;
|
|
309
327
|
|
|
310
328
|
case 8:
|
|
311
|
-
newFile =
|
|
329
|
+
newFile = _context3.sent;
|
|
312
330
|
uploadFile(newFile);
|
|
313
|
-
|
|
331
|
+
_context3.next = 15;
|
|
314
332
|
break;
|
|
315
333
|
|
|
316
334
|
case 12:
|
|
317
|
-
|
|
318
|
-
|
|
335
|
+
_context3.prev = 12;
|
|
336
|
+
_context3.t0 = _context3["catch"](5);
|
|
319
337
|
console.log('上传失败!');
|
|
320
338
|
|
|
321
339
|
case 15:
|
|
322
|
-
return
|
|
340
|
+
return _context3.abrupt("return");
|
|
323
341
|
|
|
324
342
|
case 16:
|
|
325
343
|
if (res) {
|
|
326
|
-
|
|
344
|
+
_context3.next = 18;
|
|
327
345
|
break;
|
|
328
346
|
}
|
|
329
347
|
|
|
330
|
-
return
|
|
348
|
+
return _context3.abrupt("return");
|
|
331
349
|
|
|
332
350
|
case 18:
|
|
333
351
|
// () => true
|
|
@@ -335,10 +353,10 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
335
353
|
|
|
336
354
|
case 19:
|
|
337
355
|
case "end":
|
|
338
|
-
return
|
|
356
|
+
return _context3.stop();
|
|
339
357
|
}
|
|
340
358
|
}
|
|
341
|
-
},
|
|
359
|
+
}, _callee3, null, [[5, 12]]);
|
|
342
360
|
}));
|
|
343
361
|
}, [props.beforeUpload, getFileList, uploadFile]); // 单个文件异步校验
|
|
344
362
|
|
|
@@ -400,19 +418,19 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
400
418
|
*/
|
|
401
419
|
|
|
402
420
|
var beforeUpload = useCallback(function (e) {
|
|
403
|
-
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
421
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
|
404
422
|
var files, res;
|
|
405
|
-
return _regeneratorRuntime().wrap(function
|
|
423
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
406
424
|
while (1) {
|
|
407
|
-
switch (
|
|
425
|
+
switch (_context4.prev = _context4.next) {
|
|
408
426
|
case 0:
|
|
409
427
|
files = Array.from(e.target.files);
|
|
410
|
-
|
|
411
|
-
|
|
428
|
+
_context4.prev = 1;
|
|
429
|
+
_context4.next = 4;
|
|
412
430
|
return filesLoopCheck(files);
|
|
413
431
|
|
|
414
432
|
case 4:
|
|
415
|
-
res =
|
|
433
|
+
res = _context4.sent;
|
|
416
434
|
fileUploadLen.current = res.length; // 仅单文件上传时可剪裁
|
|
417
435
|
|
|
418
436
|
if (enableCrop) {
|
|
@@ -425,40 +443,40 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
425
443
|
res.forEach(checkOver);
|
|
426
444
|
}
|
|
427
445
|
|
|
428
|
-
|
|
446
|
+
_context4.next = 13;
|
|
429
447
|
break;
|
|
430
448
|
|
|
431
449
|
case 9:
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
console.log('文件校验未通过!',
|
|
435
|
-
message.warning(
|
|
450
|
+
_context4.prev = 9;
|
|
451
|
+
_context4.t0 = _context4["catch"](1);
|
|
452
|
+
console.log('文件校验未通过!', _context4.t0.message);
|
|
453
|
+
message.warning(_context4.t0.message, 1.5);
|
|
436
454
|
|
|
437
455
|
case 13:
|
|
438
456
|
case "end":
|
|
439
|
-
return
|
|
457
|
+
return _context4.stop();
|
|
440
458
|
}
|
|
441
459
|
}
|
|
442
|
-
},
|
|
460
|
+
}, _callee4, null, [[1, 9]]);
|
|
443
461
|
}));
|
|
444
462
|
}, [filesLoopCheck, enableCrop, checkOver, fileUploadLen.current]); // 删除事件
|
|
445
463
|
|
|
446
464
|
var remove = useCallback(function (file) {
|
|
447
|
-
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
448
|
-
var
|
|
465
|
+
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
|
466
|
+
var _c, _d, res, fileList;
|
|
449
467
|
|
|
450
|
-
return _regeneratorRuntime().wrap(function
|
|
468
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
451
469
|
while (1) {
|
|
452
|
-
switch (
|
|
470
|
+
switch (_context5.prev = _context5.next) {
|
|
453
471
|
case 0:
|
|
454
|
-
|
|
455
|
-
return (
|
|
472
|
+
_context5.next = 2;
|
|
473
|
+
return (_c = props.onRemove) === null || _c === void 0 ? void 0 : _c.call(props, file);
|
|
456
474
|
|
|
457
475
|
case 2:
|
|
458
|
-
res =
|
|
476
|
+
res = _context5.sent;
|
|
459
477
|
|
|
460
478
|
if (res) {
|
|
461
|
-
fileList = (
|
|
479
|
+
fileList = (_d = getFileList()) === null || _d === void 0 ? void 0 : _d.filter(function (v) {
|
|
462
480
|
return !getHasEqual(v, file);
|
|
463
481
|
});
|
|
464
482
|
dispatch({
|
|
@@ -473,10 +491,10 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
473
491
|
|
|
474
492
|
case 4:
|
|
475
493
|
case "end":
|
|
476
|
-
return
|
|
494
|
+
return _context5.stop();
|
|
477
495
|
}
|
|
478
496
|
}
|
|
479
|
-
},
|
|
497
|
+
}, _callee5);
|
|
480
498
|
}));
|
|
481
499
|
}, [props.onRemove, getFileList, onChange, dispatch, getHasEqual]); // 点击文件链接或预览图标时的回调
|
|
482
500
|
|
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
|
}
|
|
@@ -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 ? {
|
|
@@ -21,6 +21,8 @@ var _sortable = require("@dnd-kit/sortable");
|
|
|
21
21
|
|
|
22
22
|
var _EditTable = _interopRequireDefault(require("../EditTable"));
|
|
23
23
|
|
|
24
|
+
require("./index.css");
|
|
25
|
+
|
|
24
26
|
/* eslint-disable no-unused-vars */
|
|
25
27
|
var DragOver = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
26
28
|
var instance = _ref.instance;
|
|
@@ -35,6 +37,7 @@ var DragOver = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
35
37
|
return /*#__PURE__*/_react.default.createElement(_core.DragOverlay, {
|
|
36
38
|
adjustScale: false
|
|
37
39
|
}, isDragging ? /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
+
className: "lm_editable_darg_item",
|
|
38
41
|
style: {
|
|
39
42
|
width: instance.tableWidth,
|
|
40
43
|
backgroundColor: '#fff',
|
|
@@ -43,8 +46,8 @@ var DragOver = /*#__PURE__*/_react.default.memo(function (_ref) {
|
|
|
43
46
|
}, /*#__PURE__*/_react.default.createElement(_EditTable.default, {
|
|
44
47
|
columns: columns || [],
|
|
45
48
|
showHeader: false,
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
style: {
|
|
50
|
+
overflow: 'hidden'
|
|
48
51
|
},
|
|
49
52
|
pagination: false,
|
|
50
53
|
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
|
}
|