@arim-aisdc/public-components 2.3.73 → 2.3.75

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 | Element | JSX.Element;
20
+ text: string | JSX.Element | Element;
21
21
  units?: string;
22
22
  width?: string;
23
23
  labelWidth?: string;
@@ -74,7 +74,7 @@ var defaultGetRowCanExpand = function defaultGetRowCanExpand() {
74
74
  return false;
75
75
  };
76
76
  var defaultDragBeforeEnd = function defaultDragBeforeEnd() {
77
- return false;
77
+ return true;
78
78
  };
79
79
  var TableMax = function TableMax(_ref) {
80
80
  var _JSON$parse;
@@ -1140,7 +1140,7 @@ var TableMax = function TableMax(_ref) {
1140
1140
  totalDatas: totalDatas,
1141
1141
  setRowSelection: setRowSelection,
1142
1142
  openMemo: openMemo !== null && openMemo !== void 0 ? openMemo : tableMaxConfig === null || tableMaxConfig === void 0 ? void 0 : tableMaxConfig.openMemo,
1143
- openVirtualRows: openVirtualRows,
1143
+ openVirtualRows: openVirtualRows || tableDatas.length > 100,
1144
1144
  tableKey: tableKey
1145
1145
  };
1146
1146
  var changeCompactMode = function changeCompactMode() {
@@ -1,13 +1,13 @@
1
1
  import { TableMaxColumnType } from "../../type";
2
- export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
3
- export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
4
- export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
5
- export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
2
+ export declare const numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
3
+ export declare const stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
4
+ export declare const numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
5
+ export declare const timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
6
6
  declare const customSortFns: {
7
- numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
8
- stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
9
- timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
10
- numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | -1 | 0;
7
+ numberSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
8
+ stringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
9
+ timeSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
10
+ numberOrStringSortFn: (rowA: any, rowB: any, columnId: string) => 1 | 0 | -1;
11
11
  };
12
12
  export default customSortFns;
13
13
  export type SortFnType = keyof typeof customSortFns | undefined;
@@ -38,9 +38,8 @@ export var useVirtualCalculations = function useVirtualCalculations(table, table
38
38
  // 行虚拟化配置 - 包含 rowHeight 依赖
39
39
  var rows = table.getRowModel().rows;
40
40
  var rowVirtualizerConfig = useMemo(function () {
41
- if (!config.openVirtualRows) return null;
42
41
  return {
43
- count: rows.length,
42
+ count: config.openVirtualRows ? rows.length : 0,
44
43
  estimateSize: function estimateSize() {
45
44
  return config.rowHeight || 42;
46
45
  },
@@ -54,7 +53,9 @@ export var useVirtualCalculations = function useVirtualCalculations(table, table
54
53
  }, [config.openVirtualRows, rows, config.rowHeight,
55
54
  // 关键:包含 rowHeight 依赖
56
55
  config.rowOverscan, virtualizerRefreshKey, tableKey]);
57
- var rowVirtualizer = rowVirtualizerConfig ? useVirtualizer(rowVirtualizerConfig) : null;
56
+
57
+ // const rowVirtualizer = rowVirtualizerConfig ? useVirtualizer(rowVirtualizerConfig ) : null;
58
+ var rowVirtualizer = useVirtualizer(rowVirtualizerConfig);
58
59
 
59
60
  // 响应 rowHeight 变化
60
61
  useEffect(function () {
@@ -214,6 +214,7 @@
214
214
  }
215
215
 
216
216
  &::-webkit-scrollbar-thumb {
217
+ min-height: 80px;
217
218
  border-radius: 20px;
218
219
  border: 6px solid transparent !important;
219
220
  background: @scrollThumb !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arim-aisdc/public-components",
3
- "version": "2.3.73",
3
+ "version": "2.3.75",
4
4
  "description": "前端组件库",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",