@zat-design/sisyphus-react 3.8.3-beta.6 → 3.8.3-beta.8
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/coverage/lcov-report/src/.umi/core/devScripts.ts.html +241 -0
- package/coverage/lcov-report/src/.umi/core/history.ts.html +148 -0
- package/coverage/lcov-report/src/.umi/core/index.html +206 -0
- package/coverage/lcov-report/src/.umi/core/plugin.ts.html +109 -0
- package/coverage/lcov-report/src/.umi/core/pluginRegister.ts.html +160 -0
- package/coverage/lcov-report/src/.umi/core/polyfill.ts.html +97 -0
- package/coverage/lcov-report/src/.umi/core/routes.ts.html +26050 -0
- package/coverage/lcov-report/src/.umi/core/umiExports.ts.html +112 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/demos/index.ts.html +6340 -0
- package/coverage/lcov-report/src/.umi/dumi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/dumi/layout.tsx.html +109 -0
- package/coverage/lcov-report/src/.umi/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-antd/runtime.tsx.html +172 -0
- package/coverage/lcov-report/src/.umi/plugin-helmet/exports.ts.html +94 -0
- package/coverage/lcov-report/src/.umi/plugin-helmet/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/Provider.tsx.html +196 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/exports.ts.html +106 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/models/initialState.ts.html +88 -0
- package/coverage/lcov-report/src/.umi/plugin-initial-state/runtime.tsx.html +124 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/SelectLang.tsx.html +1246 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/index.html +161 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/locale.tsx.html +268 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/localeExports.ts.html +778 -0
- package/coverage/lcov-report/src/.umi/plugin-locale/runtime.tsx.html +115 -0
- package/coverage/lcov-report/src/.umi/plugin-model/Provider.tsx.html +202 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/constant.tsx.html +97 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/dispatcher.tsx.html +142 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/executor.tsx.html +334 -0
- package/coverage/lcov-report/src/.umi/plugin-model/helpers/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/index.html +146 -0
- package/coverage/lcov-report/src/.umi/plugin-model/runtime.tsx.html +121 -0
- package/coverage/lcov-report/src/.umi/plugin-model/useModel.tsx.html +298 -0
- package/coverage/lcov-report/src/.umi/plugin-request/index.html +116 -0
- package/coverage/lcov-report/src/.umi/plugin-request/request.ts.html +919 -0
- package/coverage/lcov-report/src/.umi/umi.ts.html +268 -0
- package/dist/index.esm.css +10 -0
- package/dist/less.esm.css +10 -0
- package/es/ProForm/components/combination/ProModalSelect/index.js +17 -3
- package/es/ProTable/components/FormatColumn/index.d.ts +2 -1
- package/es/ProTable/components/FormatColumn/index.js +43 -14
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -0
- package/es/ProTable/components/RenderColumn/index.js +3 -2
- package/es/ProTable/index.js +8 -7
- package/es/ProTable/propsType.d.ts +1 -0
- package/es/ProTable/style/index.less +14 -0
- package/lib/ProForm/components/combination/ProModalSelect/index.js +17 -3
- package/lib/ProTable/components/FormatColumn/index.d.ts +2 -1
- package/lib/ProTable/components/FormatColumn/index.js +43 -14
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -0
- package/lib/ProTable/components/RenderColumn/index.js +3 -2
- package/lib/ProTable/index.js +8 -7
- package/lib/ProTable/propsType.d.ts +1 -0
- package/lib/ProTable/style/index.less +14 -0
- package/package.json +1 -1
|
@@ -190,11 +190,25 @@ var ProModalSelect = function ProModalSelect(props, ref) {
|
|
|
190
190
|
value: item[valueKey],
|
|
191
191
|
label: item[labelKey]
|
|
192
192
|
}));
|
|
193
|
-
})) === null || _data$map === void 0 ? void 0 : _data$map.join(',') :
|
|
193
|
+
})) === null || _data$map === void 0 ? void 0 : _data$map.join(',') : '';
|
|
194
194
|
};
|
|
195
195
|
var viewText = (0, _react.useMemo)(function () {
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
var nextValue = labelInValue ? value : _value;
|
|
197
|
+
if (labelInValue) {
|
|
198
|
+
nextValue = value;
|
|
199
|
+
} else {
|
|
200
|
+
var _options$find;
|
|
201
|
+
var optionDTO = options === null || options === void 0 ? void 0 : (_options$find = options.find) === null || _options$find === void 0 ? void 0 : _options$find.call(options, function (item) {
|
|
202
|
+
return item[valueKey] === value;
|
|
203
|
+
});
|
|
204
|
+
if (optionDTO) {
|
|
205
|
+
nextValue = optionDTO;
|
|
206
|
+
} else {
|
|
207
|
+
nextValue = _value;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return formatValue(nextValue);
|
|
211
|
+
}, [value, _value, options]);
|
|
198
212
|
/**
|
|
199
213
|
* 获取表格的rowKey,支持函数、字符串
|
|
200
214
|
* @date 2023-02-16
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ProTableColumn } from '../../propsType';
|
|
3
|
-
export declare const formatColumn: ({ column, originalObj, dataSourceObj, rowKey, diffToolTip, wrapToolTipProps, scroll, onUpdateMinWidth, }: {
|
|
3
|
+
export declare const formatColumn: ({ column, originalObj, dataSourceObj, rowKey, diffToolTip, wrapToolTipProps, scroll, onUpdateMinWidth, isInNewRow, }: {
|
|
4
4
|
column: ProTableColumn;
|
|
5
5
|
originalObj: any;
|
|
6
6
|
dataSourceObj: any;
|
|
@@ -9,6 +9,7 @@ export declare const formatColumn: ({ column, originalObj, dataSourceObj, rowKey
|
|
|
9
9
|
wrapToolTipProps?: any;
|
|
10
10
|
scroll?: any;
|
|
11
11
|
onUpdateMinWidth?: any;
|
|
12
|
+
isInNewRow?: any;
|
|
12
13
|
}) => void;
|
|
13
14
|
/**
|
|
14
15
|
* 查找最近的父级className
|
|
@@ -57,7 +57,8 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
57
57
|
diffToolTip = _ref2.diffToolTip,
|
|
58
58
|
wrapToolTipProps = _ref2.wrapToolTipProps,
|
|
59
59
|
scroll = _ref2.scroll,
|
|
60
|
-
onUpdateMinWidth = _ref2.onUpdateMinWidth
|
|
60
|
+
onUpdateMinWidth = _ref2.onUpdateMinWidth,
|
|
61
|
+
isInNewRow = _ref2.isInNewRow;
|
|
61
62
|
var title = column.title,
|
|
62
63
|
valueType = column.valueType,
|
|
63
64
|
_column$format = column.format,
|
|
@@ -77,7 +78,8 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
77
78
|
originalDiffTip = _column$originalDiffT === void 0 ? true : _column$originalDiffT,
|
|
78
79
|
_column$toolTipProps = column.toolTipProps,
|
|
79
80
|
toolTipProps = _column$toolTipProps === void 0 ? {} : _column$toolTipProps,
|
|
80
|
-
minWidth = column.minWidth
|
|
81
|
+
minWidth = column.minWidth,
|
|
82
|
+
diffTeleport = column.diffTeleport;
|
|
81
83
|
// 仅在 {x: 'max-content', y: 300 } 且 column无指定 width minWidth 情况下 才开启 minWidth的自动计算
|
|
82
84
|
var isMaxContentOverFlow = (0, _lodash.isObject)(scroll) ? (scroll === null || scroll === void 0 ? void 0 : scroll.x) === 'max-content' && Reflect.ownKeys(scroll).includes('y') : false;
|
|
83
85
|
calcMinWidth({
|
|
@@ -114,7 +116,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
114
116
|
}
|
|
115
117
|
};
|
|
116
118
|
if (column === null || column === void 0 ? void 0 : column.render) {
|
|
117
|
-
if (!originalObj && Object.keys(originalObj !== null && originalObj !== void 0 ? originalObj : {}).length === 0) {
|
|
119
|
+
if (!originalObj && Object.keys(originalObj !== null && originalObj !== void 0 ? originalObj : {}).length === 0 && !diffTeleport) {
|
|
118
120
|
return;
|
|
119
121
|
}
|
|
120
122
|
var originalRender = column.render; // 保存原始的 render 方法
|
|
@@ -125,6 +127,14 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
125
127
|
var _value = isFn ? originalRender === null || originalRender === void 0 ? void 0 : originalRender(value, record !== null && record !== void 0 ? record : {}, index) : undefined;
|
|
126
128
|
var originalValue = (0, _utils2.getOriginalValue)(value, record !== null && record !== void 0 ? record : {}, originalObj, rowKey, dataIndex);
|
|
127
129
|
var originalRenderValue = isFn ? originalRender === null || originalRender === void 0 ? void 0 : originalRender(originalValue, (_originalObj$record$r = originalObj === null || originalObj === void 0 ? void 0 : originalObj[record === null || record === void 0 ? void 0 : record[rowKey]]) !== null && _originalObj$record$r !== void 0 ? _originalObj$record$r : {}, index) : undefined;
|
|
130
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
131
|
+
// 把比对结果告诉我
|
|
132
|
+
if (diffTeleport) {
|
|
133
|
+
var isDiff = diffTeleport(value, record, index, originalObj === null || originalObj === void 0 ? void 0 : originalObj[record === null || record === void 0 ? void 0 : record[rowKey]]);
|
|
134
|
+
if (!isDiff) {
|
|
135
|
+
originalValue = undefined;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
128
138
|
return (0, _jsxRuntime.jsx)(_RenderColumn.default, {
|
|
129
139
|
valueType: valueType,
|
|
130
140
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -135,7 +145,8 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
135
145
|
currentValue: _value,
|
|
136
146
|
originalDiffTip: _originalDiffTip,
|
|
137
147
|
toolTipProps: _toolTipProps,
|
|
138
|
-
minWidth: minWidth
|
|
148
|
+
minWidth: minWidth,
|
|
149
|
+
isInNewRowFlag: isInNewRowFlag
|
|
139
150
|
});
|
|
140
151
|
};
|
|
141
152
|
return;
|
|
@@ -177,6 +188,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
177
188
|
size: 8,
|
|
178
189
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
|
179
190
|
});
|
|
191
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
180
192
|
return (0, _jsxRuntime.jsx)(_RenderColumn.default, {
|
|
181
193
|
valueType: valueType,
|
|
182
194
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -187,7 +199,8 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
187
199
|
currentValue: renderValue,
|
|
188
200
|
originalDiffTip: _originalDiffTip,
|
|
189
201
|
toolTipProps: _toolTipProps,
|
|
190
|
-
minWidth: minWidth
|
|
202
|
+
minWidth: minWidth,
|
|
203
|
+
isInNewRowFlag: isInNewRowFlag
|
|
191
204
|
});
|
|
192
205
|
};
|
|
193
206
|
// 千分位, 千分位带CNY前缀
|
|
@@ -213,6 +226,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
213
226
|
children: "-"
|
|
214
227
|
});
|
|
215
228
|
}
|
|
229
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
216
230
|
return (0, _jsxRuntime.jsx)(_RenderColumn.default, {
|
|
217
231
|
valueType: valueType,
|
|
218
232
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -223,7 +237,8 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
223
237
|
currentValue: renderValue,
|
|
224
238
|
originalDiffTip: _originalDiffTip,
|
|
225
239
|
toolTipProps: _toolTipProps,
|
|
226
|
-
minWidth: minWidth
|
|
240
|
+
minWidth: minWidth,
|
|
241
|
+
isInNewRowFlag: isInNewRowFlag
|
|
227
242
|
});
|
|
228
243
|
};
|
|
229
244
|
} else if (['datePicker', 'date', 'dateTime', 'dateStartTime', 'dateEndTime', 'dateStartEndTime'].includes(valueType)) {
|
|
@@ -272,6 +287,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
272
287
|
children: "-"
|
|
273
288
|
});
|
|
274
289
|
}
|
|
290
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
275
291
|
return (0, _jsxRuntime.jsx)(_RenderColumn.default, {
|
|
276
292
|
valueType: valueType,
|
|
277
293
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -282,7 +298,8 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
282
298
|
currentValue: renderValue,
|
|
283
299
|
originalDiffTip: _originalDiffTip,
|
|
284
300
|
toolTipProps: _toolTipProps,
|
|
285
|
-
minWidth: minWidth
|
|
301
|
+
minWidth: minWidth,
|
|
302
|
+
isInNewRowFlag: isInNewRowFlag
|
|
286
303
|
});
|
|
287
304
|
};
|
|
288
305
|
} else if (['enumName', 'enumCodeName'].includes(valueType)) {
|
|
@@ -311,6 +328,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
311
328
|
size: 8,
|
|
312
329
|
children: [prefixNode(value, record, index), renderValue, suffixNode(value, record, index)]
|
|
313
330
|
});
|
|
331
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
314
332
|
return (0, _jsxRuntime.jsx)(_RenderColumn.default, {
|
|
315
333
|
valueType: valueType,
|
|
316
334
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -321,7 +339,8 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
321
339
|
currentValue: renderValue,
|
|
322
340
|
originalDiffTip: _originalDiffTip,
|
|
323
341
|
toolTipProps: _toolTipProps,
|
|
324
|
-
minWidth: minWidth
|
|
342
|
+
minWidth: minWidth,
|
|
343
|
+
isInNewRowFlag: isInNewRowFlag
|
|
325
344
|
});
|
|
326
345
|
};
|
|
327
346
|
} else if (precision || prefix || suffix) {
|
|
@@ -344,6 +363,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
344
363
|
children: "-"
|
|
345
364
|
});
|
|
346
365
|
}
|
|
366
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
347
367
|
return (0, _jsxRuntime.jsx)(_RenderColumn.default, {
|
|
348
368
|
valueType: valueType,
|
|
349
369
|
originalValue: originalValue === undefined ? undefined : originalRenderValue,
|
|
@@ -354,7 +374,8 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
354
374
|
currentValue: renderValue,
|
|
355
375
|
originalDiffTip: _originalDiffTip,
|
|
356
376
|
toolTipProps: _toolTipProps,
|
|
357
|
-
minWidth: minWidth
|
|
377
|
+
minWidth: minWidth,
|
|
378
|
+
isInNewRowFlag: isInNewRowFlag
|
|
358
379
|
});
|
|
359
380
|
};
|
|
360
381
|
} else if (valueType === 'address') {
|
|
@@ -398,21 +419,24 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
398
419
|
value: realValue,
|
|
399
420
|
tooltip: false
|
|
400
421
|
});
|
|
422
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
401
423
|
return (0, _jsxRuntime.jsx)(_RenderColumn.default, {
|
|
402
424
|
valueType: valueType,
|
|
403
425
|
originalValue: originalRealValue === undefined ? undefined : originalRenderValue,
|
|
404
426
|
ellipsis: ellipsis !== null && ellipsis !== void 0 ? ellipsis : true,
|
|
405
427
|
width: width,
|
|
406
428
|
node: renderNode,
|
|
407
|
-
value:
|
|
429
|
+
value: renderValue,
|
|
408
430
|
currentValue: renderValue,
|
|
409
431
|
originalDiffTip: _originalDiffTip,
|
|
410
432
|
toolTipProps: _toolTipProps,
|
|
411
|
-
minWidth: minWidth
|
|
433
|
+
minWidth: minWidth,
|
|
434
|
+
isInNewRowFlag: isInNewRowFlag
|
|
412
435
|
});
|
|
413
436
|
};
|
|
414
437
|
} else if (copyable) {
|
|
415
438
|
column.render = function (value, record, index) {
|
|
439
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
416
440
|
return (0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
417
441
|
size: 8,
|
|
418
442
|
children: [prefixNode(value, record, index), (0, _jsxRuntime.jsx)(_RenderColumn.default, {
|
|
@@ -424,7 +448,8 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
424
448
|
value: value,
|
|
425
449
|
currentValue: value,
|
|
426
450
|
toolTipProps: _toolTipProps,
|
|
427
|
-
minWidth: minWidth
|
|
451
|
+
minWidth: minWidth,
|
|
452
|
+
isInNewRowFlag: isInNewRowFlag
|
|
428
453
|
}), suffixNode(value, record, index)]
|
|
429
454
|
});
|
|
430
455
|
};
|
|
@@ -439,6 +464,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
439
464
|
children: "-"
|
|
440
465
|
});
|
|
441
466
|
}
|
|
467
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
442
468
|
return (0, _jsxRuntime.jsxs)(_antd.Space, {
|
|
443
469
|
size: 8,
|
|
444
470
|
children: [prefixNode(value, record, index), (0, _jsxRuntime.jsx)(_RenderColumn.default, {
|
|
@@ -451,7 +477,8 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
451
477
|
currentValue: value || '-',
|
|
452
478
|
originalDiffTip: _originalDiffTip,
|
|
453
479
|
toolTipProps: _toolTipProps,
|
|
454
|
-
minWidth: minWidth
|
|
480
|
+
minWidth: minWidth,
|
|
481
|
+
isInNewRowFlag: isInNewRowFlag
|
|
455
482
|
}), suffixNode(value, record, index)]
|
|
456
483
|
});
|
|
457
484
|
};
|
|
@@ -470,6 +497,7 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
470
497
|
children: "-"
|
|
471
498
|
});
|
|
472
499
|
}
|
|
500
|
+
var isInNewRowFlag = isInNewRow(record);
|
|
473
501
|
return (0, _jsxRuntime.jsx)(_RenderColumn.default, {
|
|
474
502
|
valueType: valueType,
|
|
475
503
|
originalValue: originalValue === undefined ? undefined : originalValue || '-',
|
|
@@ -480,7 +508,8 @@ var formatColumn = exports.formatColumn = function formatColumn(_ref2) {
|
|
|
480
508
|
currentValue: value || '-',
|
|
481
509
|
originalDiffTip: _originalDiffTip,
|
|
482
510
|
toolTipProps: _toolTipProps,
|
|
483
|
-
minWidth: minWidth
|
|
511
|
+
minWidth: minWidth,
|
|
512
|
+
isInNewRowFlag: isInNewRowFlag
|
|
484
513
|
});
|
|
485
514
|
};
|
|
486
515
|
}
|
|
@@ -28,14 +28,15 @@ var RenderColumn = function RenderColumn(props) {
|
|
|
28
28
|
originalDiffTip = props.originalDiffTip,
|
|
29
29
|
_props$toolTipProps = props.toolTipProps,
|
|
30
30
|
toolTipProps = _props$toolTipProps === void 0 ? {} : _props$toolTipProps,
|
|
31
|
-
minWidth = props.minWidth
|
|
31
|
+
minWidth = props.minWidth,
|
|
32
|
+
isInNewRowFlag = props.isInNewRowFlag;
|
|
32
33
|
var _useSetState = (0, _ahooks.useSetState)({
|
|
33
34
|
tooltip: false
|
|
34
35
|
}),
|
|
35
36
|
_useSetState2 = (0, _slicedToArray2.default)(_useSetState, 2),
|
|
36
37
|
tooltip = _useSetState2[0].tooltip,
|
|
37
38
|
setState = _useSetState2[1];
|
|
38
|
-
if (originalValue !== undefined) {
|
|
39
|
+
if (originalValue !== undefined && !isInNewRowFlag) {
|
|
39
40
|
var renderNode = value ? node : '-';
|
|
40
41
|
if (ellipsis || originalDiffTip) {
|
|
41
42
|
if (ellipsis) {
|
package/lib/ProTable/index.js
CHANGED
|
@@ -190,6 +190,11 @@ function ProTable(props) {
|
|
|
190
190
|
setCurColumns(nextColumns);
|
|
191
191
|
};
|
|
192
192
|
};
|
|
193
|
+
var _rowClassName = function _rowClassName(record, index) {
|
|
194
|
+
if (originalDataSource && !originalObj.hasOwnProperty((0, _lodash.get)(record, 'rowKey'))) {
|
|
195
|
+
return 'new-cell';
|
|
196
|
+
}
|
|
197
|
+
};
|
|
193
198
|
var columns = (0, _react.useMemo)(function () {
|
|
194
199
|
var newColumns = curColumns.map(function (item, index) {
|
|
195
200
|
var _propsColumnObj$getCo2;
|
|
@@ -222,11 +227,12 @@ function ProTable(props) {
|
|
|
222
227
|
scroll: _scroll,
|
|
223
228
|
onUpdateMinWidth: function onUpdateMinWidth(w) {
|
|
224
229
|
curColumns[index].minWidth = w;
|
|
225
|
-
}
|
|
230
|
+
},
|
|
231
|
+
isInNewRow: _rowClassName
|
|
226
232
|
});
|
|
227
233
|
});
|
|
228
234
|
return newColumns;
|
|
229
|
-
}, [curColumns, handleResize, _scroll]);
|
|
235
|
+
}, [curColumns, handleResize, _scroll, originalDataSource, originalObj, _rowClassName]);
|
|
230
236
|
var _columns = (0, _react.useMemo)(function () {
|
|
231
237
|
return columns === null || columns === void 0 ? void 0 : columns.filter(function (item, index) {
|
|
232
238
|
var show = item.show;
|
|
@@ -375,11 +381,6 @@ function ProTable(props) {
|
|
|
375
381
|
return _ref7.apply(this, arguments);
|
|
376
382
|
};
|
|
377
383
|
}();
|
|
378
|
-
var _rowClassName = function _rowClassName(record, index) {
|
|
379
|
-
if (originalDataSource && !originalObj.hasOwnProperty((0, _lodash.get)(record, 'rowKey'))) {
|
|
380
|
-
return 'new-cell';
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
384
|
var TableComponent = draggable ? _RcTable.DraggableTable : _RcTable.BaseTable;
|
|
384
385
|
// 标记样式
|
|
385
386
|
var tagStyle = {
|
|
@@ -41,6 +41,7 @@ export interface ProTableColumn extends Omit<ColumnType<any>, 'dataIndex'> {
|
|
|
41
41
|
toolTipProps?: TooltipProps & React.RefAttributes<unknown>;
|
|
42
42
|
transform?: (value: any, record?: any) => string[];
|
|
43
43
|
show?: boolean | (() => boolean);
|
|
44
|
+
diffTeleport?: (value: any, record: any, index: number, originalRecord?: any) => boolean;
|
|
44
45
|
}
|
|
45
46
|
export interface CreateTreeFromArrayOptions {
|
|
46
47
|
itemKey?: string;
|
|
@@ -272,8 +272,22 @@
|
|
|
272
272
|
.@{ant-prefix}-table-cell .varied-cell {
|
|
273
273
|
margin-left: -8px;
|
|
274
274
|
padding: var(--zaui-space-size-xs, 4px) var(--zaui-space-size-sm, 8px);
|
|
275
|
+
|
|
275
276
|
background: var(--zaui-contract-bg; #fffaa1) !important;
|
|
276
277
|
border-radius: var(--zaui-border-radius, 8px);
|
|
278
|
+
.pro-form-view-container {
|
|
279
|
+
overflow: hidden;
|
|
280
|
+
white-space: nowrap;
|
|
281
|
+
text-overflow: ellipsis;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.@{ant-prefix}-table-cell .@{ant-prefix}-typography-ellipsis {
|
|
286
|
+
.pro-form-view-container {
|
|
287
|
+
overflow: hidden;
|
|
288
|
+
white-space: nowrap;
|
|
289
|
+
text-overflow: ellipsis;
|
|
290
|
+
}
|
|
277
291
|
}
|
|
278
292
|
|
|
279
293
|
.varied-cell.empty-cell {
|