@vtx/components 4.0.0-beta.8 → 4.0.0-beta.80

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.
Files changed (135) hide show
  1. package/es/index.js +3 -0
  2. package/es/utils/filterSpecialCharacters.js +47 -46
  3. package/es/utils/index.js +1 -2
  4. package/es/vtx-combogrid/Combogrid.js +5 -4
  5. package/es/vtx-combogrid/index.js +7 -4
  6. package/es/vtx-datagrid/Store/Provide.js +106 -137
  7. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -3
  8. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  9. package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  10. package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  11. package/es/vtx-datagrid/columnState.js +91 -0
  12. package/es/vtx-datagrid/index.js +124 -32
  13. package/es/vtx-datagrid/mergeComponents.js +15 -0
  14. package/es/vtx-datagrid/renderColumnButtons.js +30 -11
  15. package/es/vtx-datagrid/style/index.js +102 -20
  16. package/es/vtx-date-picker/QdatePicker.js +1 -1
  17. package/es/vtx-descriptions/Descriptions.js +29 -0
  18. package/es/vtx-descriptions/index.js +3 -0
  19. package/es/vtx-descriptions/style/index.js +19 -0
  20. package/es/vtx-ellipsis-text/index.js +7 -2
  21. package/es/vtx-ellipsis-text/style/index.js +3 -1
  22. package/es/vtx-export/index.js +25 -25
  23. package/es/vtx-export-async/History.js +11 -3
  24. package/es/vtx-export-async/index.js +45 -15
  25. package/es/vtx-export-async/util.js +16 -5
  26. package/es/vtx-form-layout/Card.js +10 -10
  27. package/es/vtx-form-layout/Divider.js +1 -1
  28. package/es/vtx-form-layout/FormItem.js +16 -16
  29. package/es/vtx-form-layout/Pane.js +23 -12
  30. package/es/vtx-icon/index.js +54 -45
  31. package/es/vtx-icon/index.js1 +90 -0
  32. package/es/vtx-image/Preview.js +11 -6
  33. package/es/vtx-image/style/index.js +0 -1
  34. package/es/vtx-import/index.js +207 -65
  35. package/es/vtx-import/result.js +28 -26
  36. package/es/vtx-import/style/index.js +16 -1
  37. package/es/vtx-import2/Content.js +2 -1
  38. package/es/vtx-import2/index.js +30 -19
  39. package/es/vtx-import2/style/index.js +60 -9
  40. package/es/vtx-modal/index.js +9 -4
  41. package/es/vtx-page-layout/style/index.js +4 -2
  42. package/es/vtx-provider/index.js +7 -3
  43. package/es/vtx-provider/locale/en_US.js +57 -3
  44. package/es/vtx-provider/locale/zh_CN.js +57 -3
  45. package/es/vtx-search/index.js +13 -9
  46. package/es/vtx-search/style/index.js +2 -1
  47. package/es/vtx-select/index.js +102 -36
  48. package/es/vtx-select/style/index.js +11 -56
  49. package/es/vtx-signature/index.js +5 -4
  50. package/es/vtx-signature/style/index.js +1 -1
  51. package/es/vtx-split-pane/Resizer.js +0 -1
  52. package/es/vtx-split-pane/SplitPane.js +42 -34
  53. package/es/vtx-split-pane/style/index.js +8 -112
  54. package/es/vtx-time-picker/index.js +27 -1
  55. package/es/vtx-transfer/Transfer.js +29 -0
  56. package/es/vtx-transfer/index.js +3 -0
  57. package/es/vtx-transfer/style/index.js +19 -0
  58. package/es/vtx-transfer-select/TransferSelect.js +143 -0
  59. package/es/vtx-transfer-select/index.js +3 -0
  60. package/es/vtx-transfer-select/style/index.js +19 -0
  61. package/es/vtx-tree/index.js +98 -35
  62. package/es/vtx-tree-select/index.js +71 -105
  63. package/es/vtx-tree-select/style/index.js +9 -3
  64. package/es/vtx-upload/FilePreview.js +2 -1
  65. package/es/vtx-wang-editor/index.js +93 -39
  66. package/es/vtx-wang-editor/wangEditorUtil.js +4 -0
  67. package/lib/index.js +36 -0
  68. package/lib/utils/filterSpecialCharacters.js +48 -46
  69. package/lib/utils/index.js +0 -7
  70. package/lib/vtx-combogrid/Combogrid.js +5 -4
  71. package/lib/vtx-combogrid/index.js +7 -4
  72. package/lib/vtx-datagrid/Store/Provide.js +113 -143
  73. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -3
  74. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  75. package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  76. package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  77. package/lib/vtx-datagrid/columnState.js +100 -0
  78. package/lib/vtx-datagrid/index.js +124 -32
  79. package/lib/vtx-datagrid/mergeComponents.js +21 -0
  80. package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
  81. package/lib/vtx-datagrid/style/index.js +102 -20
  82. package/lib/vtx-date-picker/QdatePicker.js +1 -1
  83. package/lib/vtx-descriptions/Descriptions.js +38 -0
  84. package/lib/vtx-descriptions/index.js +15 -0
  85. package/lib/vtx-descriptions/style/index.js +25 -0
  86. package/lib/vtx-ellipsis-text/index.js +7 -2
  87. package/lib/vtx-ellipsis-text/style/index.js +3 -1
  88. package/lib/vtx-export/index.js +26 -26
  89. package/lib/vtx-export-async/History.js +11 -3
  90. package/lib/vtx-export-async/index.js +43 -13
  91. package/lib/vtx-export-async/util.js +16 -5
  92. package/lib/vtx-form-layout/Card.js +9 -9
  93. package/lib/vtx-form-layout/Divider.js +1 -1
  94. package/lib/vtx-form-layout/FormItem.js +16 -16
  95. package/lib/vtx-form-layout/Pane.js +22 -11
  96. package/lib/vtx-icon/index.js +54 -52
  97. package/lib/vtx-icon/index.js1 +90 -0
  98. package/lib/vtx-image/Preview.js +11 -6
  99. package/lib/vtx-image/style/index.js +0 -1
  100. package/lib/vtx-import/index.js +205 -63
  101. package/lib/vtx-import/result.js +29 -27
  102. package/lib/vtx-import/style/index.js +16 -1
  103. package/lib/vtx-import2/Content.js +2 -1
  104. package/lib/vtx-import2/index.js +29 -18
  105. package/lib/vtx-import2/style/index.js +60 -9
  106. package/lib/vtx-modal/index.js +9 -4
  107. package/lib/vtx-page-layout/style/index.js +4 -2
  108. package/lib/vtx-provider/index.js +7 -3
  109. package/lib/vtx-provider/locale/en_US.js +57 -3
  110. package/lib/vtx-provider/locale/zh_CN.js +57 -3
  111. package/lib/vtx-search/index.js +13 -9
  112. package/lib/vtx-search/style/index.js +2 -1
  113. package/lib/vtx-select/index.js +104 -38
  114. package/lib/vtx-select/style/index.js +11 -56
  115. package/lib/vtx-signature/index.js +4 -3
  116. package/lib/vtx-signature/style/index.js +1 -1
  117. package/lib/vtx-split-pane/Resizer.js +0 -1
  118. package/lib/vtx-split-pane/SplitPane.js +40 -31
  119. package/lib/vtx-split-pane/style/index.js +8 -112
  120. package/lib/vtx-time-picker/index.js +27 -1
  121. package/lib/vtx-transfer/Transfer.js +38 -0
  122. package/lib/vtx-transfer/index.js +15 -0
  123. package/lib/vtx-transfer/style/index.js +25 -0
  124. package/lib/vtx-transfer-select/TransferSelect.js +151 -0
  125. package/lib/vtx-transfer-select/index.js +15 -0
  126. package/lib/vtx-transfer-select/style/index.js +25 -0
  127. package/lib/vtx-tree/index.js +96 -33
  128. package/lib/vtx-tree-select/index.js +71 -105
  129. package/lib/vtx-tree-select/style/index.js +9 -3
  130. package/lib/vtx-upload/FilePreview.js +2 -1
  131. package/lib/vtx-wang-editor/index.js +91 -37
  132. package/lib/vtx-wang-editor/wangEditorUtil.js +4 -0
  133. package/package.json +47 -32
  134. package/es/utils/hooks/useFetchData/index.js +0 -82
  135. package/lib/utils/hooks/useFetchData/index.js +0 -89
@@ -0,0 +1,91 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ import { genColumnKey } from "../utils/genColumnKey";
8
+ import { sortByGivenOrder } from "../utils/sortByGivenOrder";
9
+ export var indexColumnKey = '_serialNum';
10
+ export function buildColumnKeyMap() {
11
+ var tableColumn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
12
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
13
+ visibleColumnKeys = _ref.visibleColumnKeys,
14
+ defaultVisibleColumnKeys = _ref.defaultVisibleColumnKeys,
15
+ _ref$previousColumnsM = _ref.previousColumnsMap,
16
+ previousColumnsMap = _ref$previousColumnsM === void 0 ? {} : _ref$previousColumnsM,
17
+ _ref$indexColumn = _ref.indexColumn,
18
+ indexColumn = _ref$indexColumn === void 0 ? true : _ref$indexColumn;
19
+ var hasVisibleColumnKeys = Array.isArray(visibleColumnKeys);
20
+ var hasDefaultVisibleColumnKeys = Array.isArray(defaultVisibleColumnKeys);
21
+ return (tableColumn || []).reduce(function (columnKeyMap, _ref2, index) {
22
+ var _previousConfig$fixed, _previousConfig$width;
23
+ var key = _ref2.key,
24
+ dataIndex = _ref2.dataIndex,
25
+ fixed = _ref2.fixed,
26
+ disable = _ref2.disable,
27
+ width = _ref2.width;
28
+ var columnKey = genColumnKey(key !== null && key !== void 0 ? key : dataIndex, index);
29
+ var previousConfig = previousColumnsMap[columnKey] || {};
30
+ var show = previousConfig.show;
31
+ if (indexColumn && indexColumnKey === columnKey) {
32
+ show = true;
33
+ } else if (hasVisibleColumnKeys) {
34
+ show = visibleColumnKeys.includes(columnKey);
35
+ } else if (show === undefined && hasDefaultVisibleColumnKeys) {
36
+ show = defaultVisibleColumnKeys.includes(columnKey);
37
+ } else if (show === undefined) {
38
+ show = true;
39
+ }
40
+ columnKeyMap[columnKey] = {
41
+ show: show,
42
+ fixed: (_previousConfig$fixed = previousConfig.fixed) !== null && _previousConfig$fixed !== void 0 ? _previousConfig$fixed : fixed,
43
+ disable: disable,
44
+ width: (_previousConfig$width = previousConfig.width) !== null && _previousConfig$width !== void 0 ? _previousConfig$width : width
45
+ };
46
+ if (previousConfig.order !== undefined) {
47
+ columnKeyMap[columnKey].order = previousConfig.order;
48
+ }
49
+ return columnKeyMap;
50
+ }, {});
51
+ }
52
+ export function buildSortKeyColumns() {
53
+ var columnsMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
54
+ var visibleColumnKeys = arguments.length > 1 ? arguments[1] : undefined;
55
+ var defaultVisibleColumnKeys = arguments.length > 2 ? arguments[2] : undefined;
56
+ var columnKeys = Object.keys(columnsMap);
57
+ var sortKeys = visibleColumnKeys || defaultVisibleColumnKeys || [];
58
+ if (sortKeys.length > 0) {
59
+ return sortByGivenOrder(columnKeys, sortKeys);
60
+ }
61
+ return columnKeys;
62
+ }
63
+ export function getVisibleColumnKeysFromMap() {
64
+ var columnsMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
65
+ var sortKeyColumns = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
66
+ var allColumnKeys = Array.from(new Set([].concat(_toConsumableArray(sortKeyColumns), _toConsumableArray(Object.keys(columnsMap)))));
67
+ var sortIndexMap = new Map(sortKeyColumns.map(function (columnKey, index) {
68
+ return [columnKey, index];
69
+ }));
70
+ return allColumnKeys.filter(function (columnKey) {
71
+ var _columnsMap$columnKey;
72
+ return (_columnsMap$columnKey = columnsMap[columnKey]) === null || _columnsMap$columnKey === void 0 ? void 0 : _columnsMap$columnKey.show;
73
+ }).sort(function (leftKey, rightKey) {
74
+ var leftConfig = columnsMap[leftKey] || {};
75
+ var rightConfig = columnsMap[rightKey] || {};
76
+ var leftFixed = leftConfig.fixed,
77
+ leftOrder = leftConfig.order;
78
+ var rightFixed = rightConfig.fixed,
79
+ rightOrder = rightConfig.order;
80
+ if (leftFixed === 'left' && rightFixed !== 'left' || rightFixed === 'right' && leftFixed !== 'right') {
81
+ return -2;
82
+ }
83
+ if (rightFixed === 'left' && leftFixed !== 'left' || leftFixed === 'right' && rightFixed !== 'right') {
84
+ return 2;
85
+ }
86
+ if (leftOrder !== undefined || rightOrder !== undefined) {
87
+ return (leftOrder !== null && leftOrder !== void 0 ? leftOrder : 0) - (rightOrder !== null && rightOrder !== void 0 ? rightOrder : 0);
88
+ }
89
+ return (sortIndexMap.has(leftKey) ? sortIndexMap.get(leftKey) : Number.MAX_SAFE_INTEGER) - (sortIndexMap.has(rightKey) ? sortIndexMap.get(rightKey) : Number.MAX_SAFE_INTEGER);
90
+ });
91
+ }
@@ -23,6 +23,7 @@ import useSet from "../utils/useSet";
23
23
  import Alert from "./Alert";
24
24
  import ToolBar from "./ToolBar";
25
25
  import { Container, TableContext } from "./Store/Provide";
26
+ import { mergeComponentsForResize } from "./mergeComponents";
26
27
  import { useStyle } from "./style/index";
27
28
  import { useAntdColumnResize } from 'react-antd-column-resize';
28
29
  import { useIntl } from "../vtx-provider";
@@ -32,8 +33,8 @@ var isMac = navigator.userAgent.indexOf('Mac OS') !== -1;
32
33
  export var indexColumnKey = '_serialNum';
33
34
  export var DEFAULT_HEIGHTS = {
34
35
  HEAD_FOOT: 115,
35
- ALERT: 49,
36
- TOOLBAR: 56
36
+ ALERT: 48,
37
+ TOOLBAR: 64
37
38
  };
38
39
  function VtxTable(props) {
39
40
  var _rest$dataSource, _rest$rowSelection, _rest$rowSelection3, _rest$rowSelection4;
@@ -52,17 +53,19 @@ function VtxTable(props) {
52
53
  isDragRef = _useContext2.isDragRef,
53
54
  rootDomRef = _useContext2.rootDomRef,
54
55
  sortKeyColumns = _useContext2.sortKeyColumns,
55
- TextEnum = _useContext2.TextEnum;
56
+ TextEnum = _useContext2.TextEnum,
57
+ tableSize = _useContext2.tableSize;
56
58
  var _useSet = useSet({
57
59
  // 表格id
58
60
  datagridId: "vtx-datagrid-".concat(new Date().getTime()),
59
- scrollY: 0
61
+ scrollY: undefined
60
62
  }),
61
63
  _useSet2 = _slicedToArray(_useSet, 2),
62
64
  _useSet2$ = _useSet2[0],
63
65
  datagridId = _useSet2$.datagridId,
64
66
  scrollY = _useSet2$.scrollY,
65
67
  setState = _useSet2[1];
68
+ var scrollYRef = useRef(undefined);
66
69
  // 列设置提示高度
67
70
  var alertHeight = useRef(0);
68
71
  // 工具栏高度
@@ -107,25 +110,65 @@ function VtxTable(props) {
107
110
 
108
111
  // 高度计算
109
112
  var _useThrottleFn = useThrottleFn(function () {
110
- var _rootDomRef$current;
113
+ var _rootDomRef$current, _bodyDiv$getElementsB;
111
114
  if (!rootDomRef.current) {
112
115
  return null;
113
116
  }
114
- var bodyHeight = ((_rootDomRef$current = rootDomRef.current) === null || _rootDomRef$current === void 0 ? void 0 : _rootDomRef$current.clientHeight) - headFootHeight - toolbarHeight.current - alertHeight.current;
115
117
  var divs = rootDomRef.current.getElementsByTagName('div');
118
+ var pagination = Array.prototype.filter.call(rootDomRef.current.getElementsByTagName('ul'), function (dom) {
119
+ return dom.className.includes('ant-pagination');
120
+ })[0];
121
+ var tableHeader = Array.prototype.filter.call(rootDomRef.current.getElementsByTagName('thead'), function (dom) {
122
+ return dom.className.includes('ant-table-thead');
123
+ })[0];
124
+ var _headFootHeight = headFootHeight;
125
+ if (tableHeader) {
126
+ _headFootHeight = ((pagination === null || pagination === void 0 ? void 0 : pagination.clientHeight) || 0) + 32 + (tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.clientHeight);
127
+ }
128
+ var bodyHeight = ((_rootDomRef$current = rootDomRef.current) === null || _rootDomRef$current === void 0 ? void 0 : _rootDomRef$current.clientHeight) - _headFootHeight - toolbarHeight.current - alertHeight.current;
129
+ if (!bodyHeight || bodyHeight <= 0) {
130
+ return;
131
+ }
116
132
  var bodyDiv = Array.prototype.filter.call(divs, function (dom) {
117
- return dom.className.includes('ant-table-body') || dom.className.includes('ant-table-content');
133
+ return dom.className.includes('ant-table-body') || dom.className.includes('ant-table-content') || dom.className.includes('ant-table-tbody');
118
134
  })[0];
135
+ var tablePlaceholder = Array.prototype.filter.call(rootDomRef.current.getElementsByTagName('tr'), function (dom) {
136
+ return dom.className.includes('ant-table-placeholder');
137
+ })[0];
138
+ if (!bodyDiv) {
139
+ return;
140
+ }
141
+ var tableHeight = ((_bodyDiv$getElementsB = bodyDiv.getElementsByTagName('table')) === null || _bodyDiv$getElementsB === void 0 || (_bodyDiv$getElementsB = _bodyDiv$getElementsB[0]) === null || _bodyDiv$getElementsB === void 0 ? void 0 : _bodyDiv$getElementsB.clientHeight) || 0;
142
+ var minBodyHeight = Math.max(bodyHeight - (rest.scrollY || 0), 0);
119
143
  if (bodyDiv) {
120
- bodyDiv.style.minHeight = "".concat(bodyHeight - (rest.scrollY || 0), "px");
144
+ bodyDiv.style.minHeight = "".concat(minBodyHeight, "px");
145
+ }
146
+ if (tablePlaceholder) {
147
+ var placeholderHeight = Math.max(bodyHeight - (rest.scrollY || 0) - 48 - 12, 0);
148
+ tablePlaceholder.style.height = "".concat(placeholderHeight, "px");
149
+ var tableCell = Array.prototype.filter.call(tablePlaceholder.getElementsByTagName('td'), function (dom) {
150
+ return dom.className.includes('ant-table-cell');
151
+ })[0];
152
+ if (tableCell) {
153
+ tableCell.style.height = "".concat(placeholderHeight, "px");
154
+ }
155
+ }
156
+ // antd6.x 的bug 如果table的高度 没有body 高 则没有滚动条
157
+
158
+ var nextScrollY = tableHeight > bodyHeight ? bodyHeight : undefined;
159
+ if (scrollYRef.current !== nextScrollY) {
160
+ scrollYRef.current = nextScrollY;
161
+ setState({
162
+ scrollY: nextScrollY
163
+ });
121
164
  }
122
- setState({
123
- scrollY: bodyHeight
124
- });
125
165
  }, {
126
166
  wait: 350
127
167
  }),
128
168
  calculateHeight = _useThrottleFn.run;
169
+ useEffect(function () {
170
+ scrollYRef.current = scrollY;
171
+ }, [scrollY]);
129
172
  useEffect(function () {
130
173
  var resizeObserver = new ResizeObserver(function () {
131
174
  calculateHeight();
@@ -140,7 +183,14 @@ function VtxTable(props) {
140
183
  resizeObserver.disconnect();
141
184
  }
142
185
  };
143
- }, [autoFit]);
186
+ }, [autoFit, tableSize]);
187
+
188
+ // fix: 最后一页,横向滚动条上移问题
189
+ useEffect(function () {
190
+ if (scrollY > 0) {
191
+ calculateHeight();
192
+ }
193
+ }, [scrollY]);
144
194
  useLayoutEffect(function () {
145
195
  if (autoFit) {
146
196
  calculateHeight();
@@ -181,9 +231,6 @@ function VtxTable(props) {
181
231
  });
182
232
  };
183
233
  var _tableColumn = loopFilter(counter.tableColumn);
184
- if (!columnsMap['_serialNum']) {
185
- return [];
186
- }
187
234
  return sortByKeyArrayExtract(_tableColumn, sortKeyColumns, columnsMap, 'key');
188
235
  }, [columnsMap, counter.tableColumn, sortKeyColumns]);
189
236
 
@@ -221,9 +268,12 @@ function VtxTable(props) {
221
268
  result = _objectSpread(_objectSpread({}, result), {}, {
222
269
  y: scrollY - (rest.scrollY || 0)
223
270
  });
271
+ if (scrollY == undefined) {
272
+ result.y = undefined;
273
+ }
224
274
  }
225
275
  return result;
226
- }, [rest.scroll, rest.scrollY, autoFit]);
276
+ }, [rest.scroll, rest.scrollY, scrollY, autoFit]);
227
277
  var hasAlert = useMemo(function () {
228
278
  var _rest$rowSelection2;
229
279
  return (((_rest$rowSelection2 = rest.rowSelection) === null || _rest$rowSelection2 === void 0 ? void 0 : _rest$rowSelection2.selectedRowKeys) || []).length > 0;
@@ -237,15 +287,44 @@ function VtxTable(props) {
237
287
  var _useAntdColumnResize = useAntdColumnResize(function () {
238
288
  return {
239
289
  columns: columns,
240
- minWidth: 20
290
+ minWidth: 10
241
291
  };
242
292
  }, [columns]),
243
293
  resizableColumns = _useAntdColumnResize.resizableColumns,
244
294
  resizeComponents = _useAntdColumnResize.components,
245
295
  tableWidth = _useAntdColumnResize.tableWidth,
246
296
  resetColumns = _useAntdColumnResize.resetColumns;
297
+
298
+ // const _columns = useMemo(() => {
299
+ // let result = [];
300
+ // if (!showTable) {
301
+ // result = []
302
+ // } else if (isDragRef) {
303
+ // result = resizableColumns
304
+ // } else {
305
+ // result = columns
306
+ // }
307
+ // let flag = false;
308
+ // result?.map((v) => {
309
+ // if (columnsMap[v.key].width !== v.width) {
310
+ // flag = true;
311
+ // columnsMap[v.key] = {
312
+ // ...columnsMap[v.key],
313
+ // width: v.width
314
+ // };
315
+ // }
316
+ // })
317
+ // if (flag) {
318
+ // counter.setColumnsMap(
319
+ // columnsMap
320
+ // )
321
+ // }
322
+ // return result;
323
+
324
+ // }, [isDragRef, resizableColumns, showTable, columns, columnsMap])
325
+
326
+ // 1. 先计算列配置
247
327
  var _columns = useMemo(function () {
248
- var _result;
249
328
  var result = [];
250
329
  if (!showTable) {
251
330
  result = [];
@@ -254,24 +333,30 @@ function VtxTable(props) {
254
333
  } else {
255
334
  result = columns;
256
335
  }
336
+ return result;
337
+ }, [isDragRef, resizableColumns, showTable, columns]);
338
+
339
+ // 2. 在 effect 中同步列宽到 columnsMap
340
+ useEffect(function () {
341
+ if (!showTable || !_columns.length) return;
257
342
  var flag = false;
258
- (_result = result) === null || _result === void 0 || _result.map(function (v) {
259
- if (columnsMap[v.key].width !== v.width) {
343
+ var newColumnsMap = _objectSpread({}, columnsMap); // 创建副本避免直接修改
344
+
345
+ _columns.forEach(function (v) {
346
+ var _columnsMap$v$key;
347
+ if (((_columnsMap$v$key = columnsMap[v.key]) === null || _columnsMap$v$key === void 0 ? void 0 : _columnsMap$v$key.width) !== v.width) {
260
348
  flag = true;
261
- columnsMap[v.key].width = v.width;
349
+ newColumnsMap[v.key] = _objectSpread(_objectSpread({}, newColumnsMap[v.key]), {}, {
350
+ width: v.width
351
+ });
262
352
  }
263
353
  });
264
354
  if (flag) {
265
- counter.setColumnsMap(columnsMap);
355
+ counter.setColumnsMap(newColumnsMap);
266
356
  }
267
- return result;
268
- }, [isDragRef, resizableColumns, showTable, columns, columnsMap]);
357
+ }, [_columns, columnsMap, counter, showTable]);
269
358
  var _components = useMemo(function () {
270
- if (isDragRef) {
271
- return resizeComponents;
272
- } else {
273
- return components;
274
- }
359
+ return mergeComponentsForResize(components, resizeComponents, isDragRef);
275
360
  }, [isDragRef, resizeComponents, components]);
276
361
 
277
362
  // 工具栏
@@ -293,20 +378,24 @@ function VtxTable(props) {
293
378
  }) : null;
294
379
  return wrapSSR( /*#__PURE__*/_jsxs("div", {
295
380
  id: datagridId,
296
- className: classnames(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-fit"), autoFit), "".concat(prefixCls, "-noFit"), !autoFit), "".concat(prefixCls, "-nodata"), !(dataSource !== null && dataSource !== void 0 && dataSource.length)), "".concat(prefixCls, "-userAgent-mac"), isMac), "".concat(prefixCls, "-striped"), tableStyles.includes('striped')), "".concat(prefixCls, "-no-border"), !tableStyles.includes('border')), "".concat(prefixCls, "-header-background"), tableStyles.includes('header-background')), hashId),
381
+ className: classnames(prefixCls, className, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-fit"), autoFit), "".concat(prefixCls, "-noFit"), !autoFit), "".concat(prefixCls, "-nodata"), !(dataSource !== null && dataSource !== void 0 && dataSource.length)), "".concat(prefixCls, "-userAgent-mac"), isMac), "".concat(prefixCls, "-striped"), tableStyles.includes('striped')), "".concat(prefixCls, "-no-border"), !tableStyles.includes('border')), "".concat(prefixCls, "-no-data"), (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) === 0), "".concat(prefixCls, "-header-background"), tableStyles.includes('header-background')), "".concat(prefixCls, "-no-header-background"), !tableStyles.includes('header-background')), hashId),
297
382
  ref: rootDomRef,
298
383
  style: style,
299
384
  children: [toolbarRender, alertRender, /*#__PURE__*/_jsx(Table, _objectSpread(_objectSpread({
300
385
  size: counter.tableSize,
301
386
  bordered: true
387
+ // virtual
302
388
  }, rest), {}, {
303
389
  dataSource: dataSource,
304
390
  scroll: _objectSpread({
305
391
  x: 'max-content'
306
392
  }, scroll),
307
393
  pagination: getPagination(rest.pagination),
308
- style: {
309
- height: "calc(100% - ".concat(toolbarHeight.current + alertHeight.current, "px)")
394
+ xs: true,
395
+ styles: {
396
+ root: {
397
+ height: "calc(100% - ".concat(toolbarHeight.current + alertHeight.current, "px)")
398
+ }
310
399
  },
311
400
  locale: _objectSpread({
312
401
  emptyText: /*#__PURE__*/_jsx(Empty, {
@@ -315,6 +404,9 @@ function VtxTable(props) {
315
404
  }, rest.locale),
316
405
  components: _components,
317
406
  columns: _columns
407
+ // tableLayout={'auto'}
408
+ ,
409
+ tableLayout: "fixed"
318
410
  }))]
319
411
  }));
320
412
  }
@@ -0,0 +1,15 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ export function mergeComponentsForResize(components, resizeComponents, isDragRef) {
8
+ if (!isDragRef) {
9
+ return components;
10
+ }
11
+ return _objectSpread(_objectSpread(_objectSpread({}, resizeComponents || {}), components || {}), {}, {
12
+ header: _objectSpread(_objectSpread({}, (components === null || components === void 0 ? void 0 : components.header) || {}), (resizeComponents === null || resizeComponents === void 0 ? void 0 : resizeComponents.header) || {}),
13
+ body: _objectSpread(_objectSpread({}, (resizeComponents === null || resizeComponents === void 0 ? void 0 : resizeComponents.body) || {}), (components === null || components === void 0 ? void 0 : components.body) || {})
14
+ });
15
+ }
@@ -1,5 +1,12 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["confirm"];
2
+ var _excluded = ["confirm"],
3
+ _excluded2 = ["confirm"];
4
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
7
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
9
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
3
10
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
11
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
12
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
@@ -7,12 +14,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
15
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
9
16
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
10
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
14
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
15
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
16
17
  import { DownOutlined } from '@ant-design/icons';
17
18
  import { Divider, Dropdown, Popconfirm } from 'antd';
18
19
  import Icon from "../vtx-icon";
@@ -45,14 +46,32 @@ var renderColumnButtons = function renderColumnButtons(_ref) {
45
46
  /* eslint-disable */
46
47
  moreRender = /*#__PURE__*/_jsx(Dropdown, {
47
48
  menu: {
48
- items: (moreActions === null || moreActions === void 0 ? void 0 : moreActions.map(function (item, i) {
49
+ items: (moreActions === null || moreActions === void 0 ? void 0 : moreActions.map(function (item, index) {
50
+ var name = item.name,
51
+ popconfirm = item.popconfirm;
52
+ if (popconfirm) {
53
+ var confirm = popconfirm.confirm,
54
+ rest = _objectWithoutProperties(popconfirm, _excluded);
55
+ return {
56
+ key: index,
57
+ label: /*#__PURE__*/_jsx(Popconfirm, _objectSpread(_objectSpread({
58
+ trigger: ['hover'],
59
+ onConfirm: confirm ? function () {
60
+ return confirm(record, index);
61
+ } : undefined
62
+ }, rest), {}, {
63
+ children: name
64
+ }))
65
+ };
66
+ }
49
67
  return {
50
- key: i,
68
+ key: index,
51
69
  label: item.name
52
70
  };
53
71
  })) || [],
54
72
  onClick: function onClick(e) {
55
- moreActions[e.key].onClick(record, index);
73
+ var _moreActions$e$key, _moreActions$e$key$on;
74
+ (_moreActions$e$key = moreActions[e.key]) === null || _moreActions$e$key === void 0 || (_moreActions$e$key$on = _moreActions$e$key.onClick) === null || _moreActions$e$key$on === void 0 || _moreActions$e$key$on.call(_moreActions$e$key, record, index);
56
75
  }
57
76
  },
58
77
  children: /*#__PURE__*/_jsxs("a", {
@@ -82,7 +101,7 @@ var renderColumnButtons = function renderColumnButtons(_ref) {
82
101
  }, name);
83
102
  if (popconfirm) {
84
103
  var confirm = popconfirm.confirm,
85
- rest = _objectWithoutProperties(popconfirm, _excluded);
104
+ rest = _objectWithoutProperties(popconfirm, _excluded2);
86
105
  btnNode = /*#__PURE__*/_createElement(Popconfirm, _objectSpread(_objectSpread({}, rest), {}, {
87
106
  onConfirm: confirm ? function () {
88
107
  return confirm(record, index);
@@ -8,37 +8,85 @@ import { useStyle as useAntdStyle } from "../../vtx-provider";
8
8
  var genVtxStyle = function genVtxStyle(token) {
9
9
  var componentCls = token.componentCls,
10
10
  antCls = token.antCls;
11
- return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
11
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty(_defineProperty({
12
12
  position: 'relative',
13
- overflow: 'hidden'
14
- }, "".concat(antCls, "-table-wrapper"), _defineProperty(_defineProperty({}, '.ant-table', _defineProperty(_defineProperty(_defineProperty({}, '.ant-table-header', _defineProperty({}, '.ant-table-thead', {
13
+ // overflow: 'hidden',
14
+ display: 'flex',
15
+ flexDirection: 'column'
16
+ }, "".concat(antCls, "-table-cell-ellipsis"), {
17
+ whiteSpace: 'normal'
18
+ }), "".concat(antCls, "-table-wrapper"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "table", {
19
+ // minWidth: "calc(100% - 2px) !important"
20
+ }), '.ant-spin, .ant-spin-nested-loading', _defineProperty({
21
+ height: '100%'
22
+ }, '.ant-spin-container', _defineProperty({
23
+ height: '100%',
24
+ display: 'flex',
25
+ flexDirection: 'column'
26
+ }, '.ant-table', _defineProperty({
27
+ // height: '100%',
28
+ flex: 1
29
+ }, '.ant-table-container', _defineProperty(_defineProperty({
30
+ height: '100%',
31
+ borderInlineStart: 'none'
32
+ }, '.ant-table-body', {
33
+ scrollbarWidth: 'thin'
34
+ }), '.ant-table-content', _defineProperty({
35
+ height: '100%',
36
+ scrollbarWidth: 'thin'
37
+ }, 'table', {
38
+ // height: '100%',
39
+ minWidth: 'calc(100% - 1px) !important'
40
+ })))))), '.ant-table', _defineProperty(_defineProperty(_defineProperty({}, '.ant-table-header', _defineProperty({}, '.ant-table-thead', {
15
41
  '>tr>th': {
16
- background: token.colorBgContainer
42
+ background: token.colorBgContainer,
43
+ '&:first-child': {
44
+ borderInlineStart: 'var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)'
45
+ }
17
46
  }
18
47
  })), '.ant-table-cell', {
19
- minWidth: 20
20
- }), '.ant-table-body', _defineProperty({}, '.ant-table-tbody', {
48
+ // minWidth: 10,
49
+ }), '.ant-table-tbody', {
50
+ '>tr>td': {
51
+ '&:first-child': {
52
+ borderInlineStart: 'var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)'
53
+ }
54
+ },
21
55
  '>tr.ant-table-placeholder': {
22
56
  position: 'absolute',
23
- top: '25%',
57
+ top: 'auto',
58
+ bottom: 'auto',
24
59
  right: 0,
25
60
  left: 0,
26
61
  backgroundColor: 'transparent',
27
62
  borderTop: 'none',
63
+ // borderInlineEnd: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
64
+ // borderBottom: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
28
65
  '>td.ant-table-cell': {
29
- display: 'flex',
30
- alignItems: 'center',
31
- justifyContent: 'center',
66
+ padding: 0,
32
67
  width: '100%',
33
68
  height: '100%',
34
- border: 'none'
69
+ border: 'none',
70
+ '>.ant-table-expanded-row-fixed': {
71
+ display: 'flex',
72
+ alignItems: 'center',
73
+ justifyContent: 'center',
74
+ height: '100%',
75
+ width: '100%',
76
+ '&::after': {
77
+ border: 'none'
78
+ }
79
+ }
35
80
  }
36
81
  }
37
- }))), '.ant-pagination', _defineProperty({}, '.ant-pagination-item', {
82
+ })), '.ant-pagination', _defineProperty({
83
+ margin: 'var(--ant-margin) 0 0 0'
84
+ }, '.ant-pagination-item', {
38
85
  borderRadius: token.borderRadiusSM
39
- }))), "&-fit", {
40
- height: '100%'
41
- }), "&-noFit", {}), "&-no-border", _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, "".concat(antCls, "-table"), _defineProperty({}, '>.ant-table-container', _defineProperty(_defineProperty({
86
+ })))), "".concat(componentCls, "-fit"), {
87
+ height: '100%',
88
+ minHeight: 200
89
+ }), "".concat(componentCls, "-noFit"), {}), "".concat(componentCls, "-no-border"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, "".concat(antCls, "-table"), _defineProperty({}, '>.ant-table-container', _defineProperty(_defineProperty({
42
90
  borderColor: 'transparent'
43
91
  }, '.ant-table-thead', {
44
92
  '>tr>th': {
@@ -47,10 +95,14 @@ var genVtxStyle = function genVtxStyle(token) {
47
95
  }), '.ant-table-body', {
48
96
  '>table >tbody>tr>td': {
49
97
  borderInlineColor: 'transparent !important'
98
+ },
99
+ '>table >tbody>tr.ant-table-placeholder': {
100
+ borderInlineColor: 'transparent !important',
101
+ borderBottomColor: 'transparent !important'
50
102
  }
51
- }))))), "&.vtx-datagrid-striped", _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, "".concat(antCls, "-table"), _defineProperty({}, '>.ant-table-container', _defineProperty({}, '.ant-table-body', {
103
+ }))))), "".concat(componentCls, "-striped"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, "".concat(antCls, "-table"), _defineProperty({}, '>.ant-table-container', _defineProperty(_defineProperty({}, '.ant-table-body', {
52
104
  '>table >tbody>tr:nth-child(odd)>td': {
53
- backgroundColor: token.colorBgLayout,
105
+ backgroundColor: token.colorBgLayoutTable,
54
106
  '&.ant-table-cell-row-hover': {
55
107
  backgroundColor: token.colorFillAlterSolid
56
108
  }
@@ -64,11 +116,41 @@ var genVtxStyle = function genVtxStyle(token) {
64
116
  backgroundColor: token.controlItemBgActiveHover
65
117
  }
66
118
  }
67
- }))))), "&.vtx-datagrid-header-background", _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-header', _defineProperty({}, '.ant-table-thead', {
119
+ }), '.ant-table-tbody', {
120
+ '>tr:nth-child(odd)>td': {
121
+ backgroundColor: token.colorBgLayoutTable,
122
+ '&.ant-table-cell-row-hover': {
123
+ backgroundColor: token.colorFillAlterSolid
124
+ }
125
+ },
126
+ '>tr:nth-child(odd)>td.ant-table-column-sort': {
127
+ backgroundColor: token.colorFillAlterSolid
128
+ },
129
+ '>tr.ant-table-row-selected:nth-child(odd)>td': {
130
+ backgroundColor: token.controlItemBgActive,
131
+ '&.ant-table-cell-row-hover': {
132
+ backgroundColor: token.controlItemBgActiveHover
133
+ }
134
+ }
135
+ }))))), "".concat(componentCls, "-header-background"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-header', _defineProperty({}, '.ant-table-thead', {
68
136
  '>tr>th': {
69
- background: token.colorBgLayout
137
+ background: token.colorBgLayoutTable
138
+ }
139
+ }))))), "".concat(componentCls, "-no-header-background"), _defineProperty({}, "".concat(antCls, "-table-wrapper "), _defineProperty({}, '.ant-table-thead', {
140
+ '>tr>th': {
141
+ background: token.colorBgContainer
70
142
  }
71
- }))))));
143
+ }))), "".concat(componentCls, "-no-data"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-spin', _defineProperty({}, '.ant-spin-container', _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-container', _defineProperty({
144
+ borderInlineStart: 'var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)'
145
+ }, '.ant-table-content', _defineProperty({
146
+ borderRight: 'var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)',
147
+ borderBottom: 'var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)'
148
+ }, 'table', {})))))))), "".concat(componentCls, "-no-data").concat(componentCls, "-no-border"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-spin', _defineProperty({}, '.ant-spin-container', _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-container', _defineProperty({
149
+ borderInlineStart: 'none'
150
+ }, '.ant-table-content', {
151
+ borderRight: 'none',
152
+ borderBottom: 'none'
153
+ })))))));
72
154
  };
73
155
  export function useStyle(prefix) {
74
156
  return useAntdStyle(prefix, function (token) {
@@ -26,7 +26,7 @@ export default function VtxQtimePicker(props) {
26
26
  var _format$split;
27
27
  var _useContext = useContext(ConfigProvider.ConfigContext),
28
28
  getPrefixCls = _useContext.getPrefixCls;
29
- var prefixCls = getPrefixCls('', 'vtx-color-picker');
29
+ var prefixCls = getPrefixCls('', 'vtx-date-picker');
30
30
  var _useStyle = useStyle(prefixCls),
31
31
  wrapSSR = _useStyle.wrapSSR,
32
32
  hashId = _useStyle.hashId;