@arim-aisdc/public-components 2.3.51 → 2.3.52
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.
|
@@ -17,7 +17,7 @@ export declare const foramtBaseInfoField: (data: any, dataField: BaseInfoFieldTy
|
|
|
17
17
|
value: any;
|
|
18
18
|
field: string;
|
|
19
19
|
label?: string;
|
|
20
|
-
text: string |
|
|
20
|
+
text: string | Element | JSX.Element;
|
|
21
21
|
units?: string;
|
|
22
22
|
width?: string;
|
|
23
23
|
labelWidth?: string;
|
|
@@ -94,7 +94,7 @@ export var EditableCell = function EditableCell(_ref) {
|
|
|
94
94
|
return /*#__PURE__*/_jsx("div", {
|
|
95
95
|
className: "table-max-cell-wrapper",
|
|
96
96
|
style: {
|
|
97
|
-
width: "".concat(width, "px")
|
|
97
|
+
width: width ? "".concat(width, "px") : 'auto'
|
|
98
98
|
},
|
|
99
99
|
children: editing ? /*#__PURE__*/_jsx(Form.Item, {
|
|
100
100
|
name: dataIndex,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TableMaxColumnType } from "../../type";
|
|
2
|
-
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
3
|
-
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
4
|
-
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
5
|
-
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
2
|
+
export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
3
|
+
export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
4
|
+
export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
5
|
+
export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
6
6
|
declare const customSortFns: {
|
|
7
|
-
numberSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
8
|
-
stringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
9
|
-
timeSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
10
|
-
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) =>
|
|
7
|
+
numberSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
8
|
+
stringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
9
|
+
timeSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
10
|
+
numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 0 | 1 | -1;
|
|
11
11
|
};
|
|
12
12
|
export default customSortFns;
|
|
13
13
|
export type SortFnType = keyof typeof customSortFns | undefined;
|
|
@@ -17,9 +17,10 @@ import { getSizeInfo } from "../utils";
|
|
|
17
17
|
|
|
18
18
|
// 可配置的常量
|
|
19
19
|
var DEFAULT_MIN_SIZE = 120;
|
|
20
|
-
var DEFAULT_MAX_SIZE =
|
|
20
|
+
var DEFAULT_MAX_SIZE = 2000;
|
|
21
21
|
var DEFAULT_RESIZE_DEBOUNCE = 200;
|
|
22
|
-
|
|
22
|
+
// const DEFAULT_TABLE_PADDING = 10;
|
|
23
|
+
var DEFAULT_TABLE_PADDING = 0;
|
|
23
24
|
/**
|
|
24
25
|
* 获取表格容器的有效宽度(减去边框)
|
|
25
26
|
*/
|
|
@@ -189,6 +190,18 @@ export var useColumnWidth = function useColumnWidth(_ref) {
|
|
|
189
190
|
result[key] = Math.min(result[key] + averageExtra, DEFAULT_MAX_SIZE);
|
|
190
191
|
});
|
|
191
192
|
}
|
|
193
|
+
|
|
194
|
+
// console.log({
|
|
195
|
+
// currentWidth,
|
|
196
|
+
// columnsSizeMap,
|
|
197
|
+
// adjustableColumns,
|
|
198
|
+
// hasWidthColumns,
|
|
199
|
+
// noWidthColumns,
|
|
200
|
+
// totalWidth,
|
|
201
|
+
// remainWidth,
|
|
202
|
+
// result
|
|
203
|
+
// }, 'hasWidthColumns')
|
|
204
|
+
|
|
192
205
|
return result;
|
|
193
206
|
}, [getAdjustableColumns, getTableWidth, state.tableContainerWidth]);
|
|
194
207
|
|
|
@@ -226,6 +239,15 @@ export var useColumnWidth = function useColumnWidth(_ref) {
|
|
|
226
239
|
});
|
|
227
240
|
}
|
|
228
241
|
|
|
242
|
+
// console.log({
|
|
243
|
+
// prevState,
|
|
244
|
+
// initColumnsSizeMap,
|
|
245
|
+
// visibleColumnsSizeMap,
|
|
246
|
+
// cache,
|
|
247
|
+
// cacheMaxAge
|
|
248
|
+
|
|
249
|
+
// }, 'columnSizeMap123')
|
|
250
|
+
|
|
229
251
|
// 计算可见列数
|
|
230
252
|
var visibleCount = allCount - Object.keys(columnVisibleConfig).filter(function (key) {
|
|
231
253
|
return !columnVisibleConfig[key];
|