@arim-aisdc/public-components 2.3.64 → 2.3.66

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 | JSX.Element | Element;
20
+ text: string | Element | JSX.Element;
21
21
  units?: string;
22
22
  width?: string;
23
23
  labelWidth?: string;
@@ -51,6 +51,9 @@ var SplitterPane = function SplitterPane(_ref) {
51
51
  setSizes(defaultCacheSizes);
52
52
  }, []);
53
53
  useUpdateLayoutEffect(function () {
54
+ console.log(options, options === null || options === void 0 ? void 0 : options.map(function (item) {
55
+ return item === null || item === void 0 ? void 0 : item.size;
56
+ }), '3333');
54
57
  setSizes(options === null || options === void 0 ? void 0 : options.map(function (item) {
55
58
  return item === null || item === void 0 ? void 0 : item.size;
56
59
  }));
@@ -58,6 +61,7 @@ var SplitterPane = function SplitterPane(_ref) {
58
61
  return item === null || item === void 0 ? void 0 : item.size;
59
62
  }))]);
60
63
  useDeepCompareEffect(function () {
64
+ console.log(sizes, JSON.stringify(sizes), '33331');
61
65
  localStorage.setItem(_cacheKeyKey, JSON.stringify(sizes));
62
66
  }, [sizes]);
63
67
 
@@ -106,9 +110,25 @@ var SplitterPane = function SplitterPane(_ref) {
106
110
  };
107
111
  }, [sizes]);
108
112
  var handlePaneResize = useCallback(function (newSizes) {
109
- setSizes(newSizes);
113
+ var _convertPixelsToPerce;
114
+ setSizes((_convertPixelsToPerce = convertPixelsToPercentages(newSizes)) !== null && _convertPixelsToPerce !== void 0 ? _convertPixelsToPerce : newSizes);
110
115
  onResize === null || onResize === void 0 || onResize(newSizes);
111
116
  }, [onResize]);
117
+
118
+ // 将像素值转换为百分比
119
+ var convertPixelsToPercentages = useCallback(function (pixelSizes) {
120
+ var isValidSizes = sizes.every(function (size) {
121
+ return typeof size === 'number' && size > 0;
122
+ });
123
+ if (!isValidSizes) return null;
124
+ var totalSize = pixelSizes.reduce(function (sum, size) {
125
+ return sum + size;
126
+ }, 0);
127
+ return pixelSizes.map(function (size) {
128
+ var percentage = size / totalSize * 100;
129
+ return "".concat(Math.round(percentage), "%");
130
+ });
131
+ }, []);
112
132
  return /*#__PURE__*/_jsx(Splitter, {
113
133
  layout: layout,
114
134
  onResize: handlePaneResize,
@@ -158,10 +158,8 @@ table {
158
158
  // width: var(--table-width);
159
159
 
160
160
  .empty-wrapper {
161
- width: var(--table-body-width);
162
- height: var(--table-body-height);
163
-
164
- // height: 100%;
161
+ width: var(--table-body-width) !important;
162
+ height: var(--table-body-height) !important;
165
163
  min-height: 120px;
166
164
  display: flex;
167
165
  flex-direction: column;
@@ -169,6 +167,7 @@ table {
169
167
  align-items: center;
170
168
  position: sticky;
171
169
  left: 0;
170
+ border: none !important;
172
171
 
173
172
  .empty-content {
174
173
  display: flex;
@@ -1306,14 +1306,17 @@ var TableMax = function TableMax(_ref) {
1306
1306
  width: "100%"
1307
1307
  },
1308
1308
  onMouseEnter: function onMouseEnter() {
1309
- var _tableBodyRef$current;
1309
+ var _tableBodyRef$current, _tableBodyRef$current2;
1310
1310
  // 给当前元素添加hover类
1311
- (_tableBodyRef$current = tableBodyRef.current) === null || _tableBodyRef$current === void 0 || _tableBodyRef$current.classList.add('hover-active');
1311
+ if (((_tableBodyRef$current = tableBodyRef.current) === null || _tableBodyRef$current === void 0 ? void 0 : _tableBodyRef$current.scrollLeft) > 2 || ((_tableBodyRef$current2 = tableBodyRef.current) === null || _tableBodyRef$current2 === void 0 ? void 0 : _tableBodyRef$current2.scrollTop) > 2) {
1312
+ var _tableBodyRef$current3;
1313
+ (_tableBodyRef$current3 = tableBodyRef.current) === null || _tableBodyRef$current3 === void 0 || _tableBodyRef$current3.classList.add('hover-active');
1314
+ }
1312
1315
  },
1313
1316
  onMouseLeave: function onMouseLeave() {
1314
- var _tableBodyRef$current2;
1317
+ var _tableBodyRef$current4;
1315
1318
  // 移除当前元素的hover类
1316
- (_tableBodyRef$current2 = tableBodyRef.current) === null || _tableBodyRef$current2 === void 0 || _tableBodyRef$current2.classList.remove('hover-active');
1319
+ (_tableBodyRef$current4 = tableBodyRef.current) === null || _tableBodyRef$current4 === void 0 || _tableBodyRef$current4.classList.remove('hover-active');
1317
1320
  },
1318
1321
  children: /*#__PURE__*/_jsx(UnifiedTable, {
1319
1322
  tableId: tableId,
@@ -10,7 +10,7 @@
10
10
 
11
11
  .filter-panel-wrapper {
12
12
  position: fixed;
13
- z-index: 9999;
13
+ z-index: 1000;
14
14
  border-radius: 2px;
15
15
  width: fit-content;
16
16
  height: fit-content;
@@ -351,7 +351,7 @@ export var useColumnWidth = function useColumnWidth(_ref) {
351
351
  var _tableContentRef$curr, _tableContentRef$curr2;
352
352
  debouncedHandleResizeRef.current(newWidth);
353
353
  (_tableContentRef$curr = tableContentRef.current) === null || _tableContentRef$curr === void 0 || (_tableContentRef$curr = _tableContentRef$curr.style) === null || _tableContentRef$curr === void 0 || _tableContentRef$curr.setProperty('--table-body-width', "".concat(newWidth - 12, "px"));
354
- (_tableContentRef$curr2 = tableContentRef.current) === null || _tableContentRef$curr2 === void 0 || (_tableContentRef$curr2 = _tableContentRef$curr2.style) === null || _tableContentRef$curr2 === void 0 || _tableContentRef$curr2.setProperty('--table-body-height', "".concat(height - 60, "px"));
354
+ (_tableContentRef$curr2 = tableContentRef.current) === null || _tableContentRef$curr2 === void 0 || (_tableContentRef$curr2 = _tableContentRef$curr2.style) === null || _tableContentRef$curr2 === void 0 || _tableContentRef$curr2.setProperty('--table-body-height', "".concat(height - 54, "px"));
355
355
  }
356
356
  });
357
357
  observer.observe(tableContentRef.current);
@@ -88,7 +88,7 @@
88
88
  position: relative;
89
89
  display: flex;
90
90
  border-radius: @global-table-max-center-border-radius;
91
- --cell-height: 41px;
91
+ --cell-height: 42px;
92
92
  --cell-padding: 0 8px;
93
93
 
94
94
  .cell-wapper {
@@ -220,6 +220,18 @@
220
220
  background-clip: padding-box !important;
221
221
  }
222
222
 
223
+ &::after {
224
+ content: '';
225
+ display: block;
226
+ position: absolute;
227
+ right: 0;
228
+ top: 0;
229
+ width: 10px;
230
+ height: var(--cell-height);
231
+ background-color: var(--globalColor_14);
232
+ z-index: 300;
233
+ }
234
+
223
235
  }
224
236
  .table-body.hover-active {
225
237
  &::-webkit-scrollbar-thumb {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arim-aisdc/public-components",
3
- "version": "2.3.64",
3
+ "version": "2.3.66",
4
4
  "description": "前端组件库",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",