@vtx/components 4.0.0-beta.7 → 4.0.0-beta.71

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 (212) hide show
  1. package/README.md +19 -19
  2. package/es/index.js +3 -0
  3. package/es/utils/components/LabelIconTip/index.js +7 -7
  4. package/es/utils/conversionMomentValue/index.js +25 -25
  5. package/es/utils/filterSpecialCharacters.js +53 -52
  6. package/es/utils/genCopyable/index.js +6 -6
  7. package/es/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  8. package/es/utils/hooks/useDebounceFn/index.js +4 -4
  9. package/es/utils/hooks/useDebounceValue/index.js +6 -6
  10. package/es/utils/hooks/useDeepCompareMemo/index.js +7 -7
  11. package/es/utils/hooks/useLatest/index.js +2 -2
  12. package/es/utils/hooks/useRefCallback/index.js +5 -5
  13. package/es/utils/index.js +1 -2
  14. package/es/utils/isBrowser/index.js +7 -7
  15. package/es/utils/isUrl/index.js +4 -4
  16. package/es/utils/merge/index.js +4 -4
  17. package/es/utils/nanoid/index.js +4 -4
  18. package/es/utils/omitBoolean/index.js +4 -4
  19. package/es/utils/parseValueToMoment/index.js +4 -4
  20. package/es/utils/proFieldParsingText/index.js +10 -10
  21. package/es/utils/transformKeySubmitValue/index.js +57 -57
  22. package/es/utils/useEditableArray/index.js +46 -46
  23. package/es/utils/useEditableMap/index.js +22 -22
  24. package/es/utils/useMediaQuery/index.js +5 -5
  25. package/es/vtx-color-picker/index.js +138 -33
  26. package/es/vtx-color-picker/style/index.js +36 -12
  27. package/es/vtx-combogrid/Combogrid.js +16 -10
  28. package/es/vtx-combogrid/index.js +7 -4
  29. package/es/vtx-combogrid/style/index.js +4 -4
  30. package/es/vtx-datagrid/Store/Provide.js +109 -132
  31. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +15 -9
  32. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  33. package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  34. package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  35. package/es/vtx-datagrid/ToolBar/index.js +2 -2
  36. package/es/vtx-datagrid/columnState.js +64 -0
  37. package/es/vtx-datagrid/index.js +114 -35
  38. package/es/vtx-datagrid/mergeComponents.js +15 -0
  39. package/es/vtx-datagrid/renderColumnButtons.js +30 -11
  40. package/es/vtx-datagrid/style/index.js +102 -20
  41. package/es/vtx-datagrid/style/index.less +242 -242
  42. package/es/vtx-date-picker/QdatePicker.js +1 -1
  43. package/es/vtx-date-picker/style/index.less +39 -39
  44. package/es/vtx-descriptions/Descriptions.js +29 -0
  45. package/es/vtx-descriptions/index.js +3 -0
  46. package/es/vtx-descriptions/style/index.js +19 -0
  47. package/es/vtx-ellipsis-text/index.js +7 -2
  48. package/es/vtx-ellipsis-text/style/index.js +3 -1
  49. package/es/vtx-export/index.js +33 -33
  50. package/es/vtx-export-async/History.js +11 -3
  51. package/es/vtx-export-async/index.js +45 -15
  52. package/es/vtx-form-layout/Card.js +10 -10
  53. package/es/vtx-form-layout/Divider.js +1 -1
  54. package/es/vtx-form-layout/FormItem.js +18 -17
  55. package/es/vtx-form-layout/Pane.js +23 -12
  56. package/es/vtx-icon/index.js +54 -45
  57. package/es/vtx-icon/index.js1 +90 -0
  58. package/es/vtx-image/Preview.js +11 -6
  59. package/es/vtx-image/style/index.js +0 -1
  60. package/es/vtx-import/index.js +155 -43
  61. package/es/vtx-import/result.js +6 -2
  62. package/es/vtx-import/style/index.js +16 -1
  63. package/es/vtx-import2/Content.js +2 -1
  64. package/es/vtx-import2/index.js +31 -20
  65. package/es/vtx-import2/style/index.js +60 -9
  66. package/es/vtx-input/TextArea/index.js +11 -6
  67. package/es/vtx-modal/index.js +11 -6
  68. package/es/vtx-modal/style/index.js +5 -3
  69. package/es/vtx-page-layout/Basic.js +2 -2
  70. package/es/vtx-page-layout/Content.js +1 -1
  71. package/es/vtx-page-layout/TabLayout.js +7 -13
  72. package/es/vtx-page-layout/TableLayout.js +24 -14
  73. package/es/vtx-page-layout/TableWrap.js +3 -2
  74. package/es/vtx-page-layout/TreeLayout.js +8 -14
  75. package/es/vtx-page-layout/container.js +8 -7
  76. package/es/vtx-page-layout/style/index.js +4 -2
  77. package/es/vtx-provider/index.js +50 -40
  78. package/es/vtx-provider/intl.js +9 -9
  79. package/es/vtx-provider/locale/en_US.js +65 -5
  80. package/es/vtx-provider/locale/zh_CN.js +75 -5
  81. package/es/vtx-provider/useStyle/index.js +25 -21
  82. package/es/vtx-scrollable-row/index.js +38 -28
  83. package/es/vtx-search/index.js +18 -13
  84. package/es/vtx-search/style/index.js +2 -1
  85. package/es/vtx-select/index.js +132 -46
  86. package/es/vtx-select/style/index.js +11 -56
  87. package/es/vtx-signature/index.js +5 -4
  88. package/es/vtx-signature/style/index.js +1 -1
  89. package/es/vtx-split-pane/Resizer.js +0 -1
  90. package/es/vtx-split-pane/SplitPane.js +34 -25
  91. package/es/vtx-split-pane/style/index.js +8 -112
  92. package/es/vtx-time-picker/index.js +27 -1
  93. package/es/vtx-transfer/Transfer.js +29 -0
  94. package/es/vtx-transfer/index.js +3 -0
  95. package/es/vtx-transfer/style/index.js +19 -0
  96. package/es/vtx-transfer-select/TransferSelect.js +143 -0
  97. package/es/vtx-transfer-select/index.js +3 -0
  98. package/es/vtx-transfer-select/style/index.js +19 -0
  99. package/es/vtx-tree/index.js +104 -40
  100. package/es/vtx-tree-select/index.js +75 -105
  101. package/es/vtx-tree-select/style/index.js +9 -3
  102. package/es/vtx-upload/FilePreview.js +2 -1
  103. package/es/vtx-wang-editor/index.js +291 -113
  104. package/es/vtx-wang-editor/style/index.less +12 -12
  105. package/es/vtx-wang-editor/wangEditorUtil.js +59 -9
  106. package/lib/index.js +36 -0
  107. package/lib/utils/components/LabelIconTip/index.js +7 -7
  108. package/lib/utils/conversionMomentValue/index.js +25 -25
  109. package/lib/utils/filterSpecialCharacters.js +54 -52
  110. package/lib/utils/genCopyable/index.js +6 -6
  111. package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
  112. package/lib/utils/hooks/useDebounceFn/index.js +4 -4
  113. package/lib/utils/hooks/useDebounceValue/index.js +6 -6
  114. package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
  115. package/lib/utils/hooks/useLatest/index.js +2 -2
  116. package/lib/utils/hooks/useRefCallback/index.js +5 -5
  117. package/lib/utils/index.js +0 -7
  118. package/lib/utils/isBrowser/index.js +7 -7
  119. package/lib/utils/isUrl/index.js +4 -4
  120. package/lib/utils/merge/index.js +4 -4
  121. package/lib/utils/nanoid/index.js +4 -4
  122. package/lib/utils/omitBoolean/index.js +4 -4
  123. package/lib/utils/parseValueToMoment/index.js +4 -4
  124. package/lib/utils/proFieldParsingText/index.js +10 -10
  125. package/lib/utils/transformKeySubmitValue/index.js +57 -57
  126. package/lib/utils/useEditableArray/index.js +46 -46
  127. package/lib/utils/useEditableMap/index.js +22 -22
  128. package/lib/utils/useMediaQuery/index.js +5 -5
  129. package/lib/vtx-color-picker/index.js +139 -34
  130. package/lib/vtx-color-picker/style/index.js +36 -12
  131. package/lib/vtx-combogrid/Combogrid.js +16 -10
  132. package/lib/vtx-combogrid/index.js +7 -4
  133. package/lib/vtx-combogrid/style/index.js +4 -4
  134. package/lib/vtx-datagrid/Store/Provide.js +116 -138
  135. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +15 -10
  136. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  137. package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  138. package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  139. package/lib/vtx-datagrid/ToolBar/index.js +2 -2
  140. package/lib/vtx-datagrid/columnState.js +73 -0
  141. package/lib/vtx-datagrid/index.js +115 -35
  142. package/lib/vtx-datagrid/mergeComponents.js +21 -0
  143. package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
  144. package/lib/vtx-datagrid/style/index.js +102 -20
  145. package/lib/vtx-datagrid/style/index.less +242 -242
  146. package/lib/vtx-date-picker/QdatePicker.js +1 -1
  147. package/lib/vtx-date-picker/style/index.less +39 -39
  148. package/lib/vtx-descriptions/Descriptions.js +38 -0
  149. package/lib/vtx-descriptions/index.js +15 -0
  150. package/lib/vtx-descriptions/style/index.js +25 -0
  151. package/lib/vtx-ellipsis-text/index.js +7 -2
  152. package/lib/vtx-ellipsis-text/style/index.js +3 -1
  153. package/lib/vtx-export/index.js +34 -34
  154. package/lib/vtx-export-async/History.js +11 -3
  155. package/lib/vtx-export-async/index.js +43 -13
  156. package/lib/vtx-form-layout/Card.js +9 -9
  157. package/lib/vtx-form-layout/Divider.js +1 -1
  158. package/lib/vtx-form-layout/FormItem.js +18 -17
  159. package/lib/vtx-form-layout/Pane.js +22 -11
  160. package/lib/vtx-icon/index.js +54 -52
  161. package/lib/vtx-icon/index.js1 +90 -0
  162. package/lib/vtx-image/Preview.js +11 -6
  163. package/lib/vtx-image/style/index.js +0 -1
  164. package/lib/vtx-import/index.js +154 -42
  165. package/lib/vtx-import/result.js +6 -2
  166. package/lib/vtx-import/style/index.js +16 -1
  167. package/lib/vtx-import2/Content.js +2 -1
  168. package/lib/vtx-import2/index.js +30 -19
  169. package/lib/vtx-import2/style/index.js +60 -9
  170. package/lib/vtx-input/TextArea/index.js +11 -6
  171. package/lib/vtx-modal/index.js +11 -6
  172. package/lib/vtx-modal/style/index.js +5 -3
  173. package/lib/vtx-page-layout/Basic.js +2 -2
  174. package/lib/vtx-page-layout/Content.js +1 -1
  175. package/lib/vtx-page-layout/TabLayout.js +8 -14
  176. package/lib/vtx-page-layout/TableLayout.js +24 -14
  177. package/lib/vtx-page-layout/TableWrap.js +3 -2
  178. package/lib/vtx-page-layout/TreeLayout.js +9 -15
  179. package/lib/vtx-page-layout/container.js +8 -7
  180. package/lib/vtx-page-layout/style/index.js +4 -2
  181. package/lib/vtx-provider/index.js +49 -40
  182. package/lib/vtx-provider/intl.js +9 -9
  183. package/lib/vtx-provider/locale/en_US.js +65 -5
  184. package/lib/vtx-provider/locale/zh_CN.js +75 -5
  185. package/lib/vtx-provider/useStyle/index.js +25 -21
  186. package/lib/vtx-scrollable-row/index.js +38 -28
  187. package/lib/vtx-search/index.js +18 -13
  188. package/lib/vtx-search/style/index.js +2 -1
  189. package/lib/vtx-select/index.js +134 -48
  190. package/lib/vtx-select/style/index.js +11 -56
  191. package/lib/vtx-signature/index.js +4 -3
  192. package/lib/vtx-signature/style/index.js +1 -1
  193. package/lib/vtx-split-pane/Resizer.js +0 -1
  194. package/lib/vtx-split-pane/SplitPane.js +32 -23
  195. package/lib/vtx-split-pane/style/index.js +8 -112
  196. package/lib/vtx-time-picker/index.js +27 -1
  197. package/lib/vtx-transfer/Transfer.js +38 -0
  198. package/lib/vtx-transfer/index.js +15 -0
  199. package/lib/vtx-transfer/style/index.js +25 -0
  200. package/lib/vtx-transfer-select/TransferSelect.js +151 -0
  201. package/lib/vtx-transfer-select/index.js +15 -0
  202. package/lib/vtx-transfer-select/style/index.js +25 -0
  203. package/lib/vtx-tree/index.js +102 -38
  204. package/lib/vtx-tree-select/index.js +75 -105
  205. package/lib/vtx-tree-select/style/index.js +9 -3
  206. package/lib/vtx-upload/FilePreview.js +2 -1
  207. package/lib/vtx-wang-editor/index.js +289 -113
  208. package/lib/vtx-wang-editor/style/index.less +12 -12
  209. package/lib/vtx-wang-editor/wangEditorUtil.js +59 -10
  210. package/package.json +238 -222
  211. package/es/utils/hooks/useFetchData/index.js +0 -82
  212. package/lib/utils/hooks/useFetchData/index.js +0 -89
@@ -4,6 +4,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ exports.DEFAULT_HEIGHTS = void 0;
7
8
  exports.VtxDatagrid = VtxDatagrid;
8
9
  exports.indexColumnKey = exports.default = void 0;
9
10
  var _ahooks = require("ahooks");
@@ -16,8 +17,10 @@ var _useSet3 = _interopRequireDefault(require("../utils/useSet"));
16
17
  var _Alert = _interopRequireDefault(require("./Alert"));
17
18
  var _ToolBar = _interopRequireDefault(require("./ToolBar"));
18
19
  var _Provide = require("./Store/Provide");
20
+ var _mergeComponents = require("./mergeComponents");
19
21
  var _index = require("./style/index");
20
22
  var _reactAntdColumnResize = require("react-antd-column-resize");
23
+ var _vtxProvider = require("../vtx-provider");
21
24
  var _jsxRuntime = require("react/jsx-runtime");
22
25
  var _excluded = ["toolbar", "toolbarClassName", "toolbarTilte", "buttonGroup", "refreshIconVisible", "hideColumnSetting", "hideColumnHeight", "onRefresh", "bordered", "startIndex", "autoFit", "headFootHeight", "columnResizable", "components", "className", "style", "emptyText", "onRowSelectionClear", "onColumnsSave", "uniqueKey", "prefixUrl", "hideSelectionClear", "customEnumText"];
23
26
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
@@ -38,8 +41,14 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
38
41
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
39
42
  var isMac = navigator.userAgent.indexOf('Mac OS') !== -1;
40
43
  var indexColumnKey = exports.indexColumnKey = '_serialNum';
44
+ var DEFAULT_HEIGHTS = exports.DEFAULT_HEIGHTS = {
45
+ HEAD_FOOT: 115,
46
+ ALERT: 48,
47
+ TOOLBAR: 64
48
+ };
41
49
  function VtxTable(props) {
42
50
  var _rest$dataSource, _rest$rowSelection, _rest$rowSelection3, _rest$rowSelection4;
51
+ var intl = (0, _vtxProvider.useIntl)();
43
52
  var _useContext = (0, _react.useContext)(_antd.ConfigProvider.ConfigContext),
44
53
  getPrefixCls = _useContext.getPrefixCls;
45
54
  var prefixCls = getPrefixCls('', 'vtx-datagrid');
@@ -54,7 +63,8 @@ function VtxTable(props) {
54
63
  isDragRef = _useContext2.isDragRef,
55
64
  rootDomRef = _useContext2.rootDomRef,
56
65
  sortKeyColumns = _useContext2.sortKeyColumns,
57
- TextEnum = _useContext2.TextEnum;
66
+ TextEnum = _useContext2.TextEnum,
67
+ tableSize = _useContext2.tableSize;
58
68
  var _useSet = (0, _useSet3.default)({
59
69
  // 表格id
60
70
  datagridId: "vtx-datagrid-".concat(new Date().getTime()),
@@ -75,7 +85,7 @@ function VtxTable(props) {
75
85
  toolbar = _props$toolbar === void 0 ? true : _props$toolbar,
76
86
  toolbarClassName = props.toolbarClassName,
77
87
  _props$toolbarTilte = props.toolbarTilte,
78
- toolbarTilte = _props$toolbarTilte === void 0 ? '查询结果' : _props$toolbarTilte,
88
+ toolbarTilte = _props$toolbarTilte === void 0 ? intl.getMessage('datagrid.queryResults', '查询结果') : _props$toolbarTilte,
79
89
  buttonGroup = props.buttonGroup,
80
90
  _props$refreshIconVis = props.refreshIconVisible,
81
91
  refreshIconVisible = _props$refreshIconVis === void 0 ? true : _props$refreshIconVis,
@@ -89,14 +99,14 @@ function VtxTable(props) {
89
99
  _props$autoFit = props.autoFit,
90
100
  autoFit = _props$autoFit === void 0 ? true : _props$autoFit,
91
101
  _props$headFootHeight = props.headFootHeight,
92
- headFootHeight = _props$headFootHeight === void 0 ? 115 : _props$headFootHeight,
102
+ headFootHeight = _props$headFootHeight === void 0 ? DEFAULT_HEIGHTS.HEAD_FOOT : _props$headFootHeight,
93
103
  _props$columnResizabl = props.columnResizable,
94
104
  columnResizable = _props$columnResizabl === void 0 ? true : _props$columnResizabl,
95
105
  components = props.components,
96
106
  className = props.className,
97
107
  style = props.style,
98
108
  _props$emptyText = props.emptyText,
99
- emptyText = _props$emptyText === void 0 ? '暂无数据' : _props$emptyText,
109
+ emptyText = _props$emptyText === void 0 ? intl.getMessage('select.empty', '暂无数据') : _props$emptyText,
100
110
  onRowSelectionClear = props.onRowSelectionClear,
101
111
  onColumnsSave = props.onColumnsSave,
102
112
  uniqueKey = props.uniqueKey,
@@ -109,20 +119,43 @@ function VtxTable(props) {
109
119
 
110
120
  // 高度计算
111
121
  var _useThrottleFn = (0, _ahooks.useThrottleFn)(function () {
112
- var _rootDomRef$current;
122
+ var _rootDomRef$current, _bodyDiv$getElementsB;
113
123
  if (!rootDomRef.current) {
114
124
  return null;
115
125
  }
116
- var bodyHeight = ((_rootDomRef$current = rootDomRef.current) === null || _rootDomRef$current === void 0 ? void 0 : _rootDomRef$current.clientHeight) - headFootHeight - toolbarHeight.current - alertHeight.current;
117
126
  var divs = rootDomRef.current.getElementsByTagName('div');
127
+ var pagination = Array.prototype.filter.call(rootDomRef.current.getElementsByTagName('ul'), function (dom) {
128
+ return dom.className.includes('ant-pagination');
129
+ })[0];
130
+ var tableHeader = Array.prototype.filter.call(rootDomRef.current.getElementsByTagName('thead'), function (dom) {
131
+ return dom.className.includes('ant-table-thead');
132
+ })[0];
133
+ var _headFootHeight = headFootHeight;
134
+ if (tableHeader) {
135
+ _headFootHeight = ((pagination === null || pagination === void 0 ? void 0 : pagination.clientHeight) || 0) + 32 + (tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.clientHeight);
136
+ }
137
+ var bodyHeight = ((_rootDomRef$current = rootDomRef.current) === null || _rootDomRef$current === void 0 ? void 0 : _rootDomRef$current.clientHeight) - _headFootHeight - toolbarHeight.current - alertHeight.current;
118
138
  var bodyDiv = Array.prototype.filter.call(divs, function (dom) {
119
- return dom.className.includes('ant-table-body') || dom.className.includes('ant-table-content');
139
+ return dom.className.includes('ant-table-body') || dom.className.includes('ant-table-content') || dom.className.includes('ant-table-tbody');
140
+ })[0];
141
+ var tablePlaceholder = Array.prototype.filter.call(rootDomRef.current.getElementsByTagName('tr'), function (dom) {
142
+ return dom.className.includes('ant-table-placeholder');
120
143
  })[0];
121
144
  if (bodyDiv) {
122
145
  bodyDiv.style.minHeight = "".concat(bodyHeight - (rest.scrollY || 0), "px");
123
146
  }
147
+ 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;
148
+ if (tablePlaceholder) {
149
+ tablePlaceholder.style.height = "".concat(bodyHeight - (rest.scrollY || 0) - 48 - 12, "px");
150
+ var tableCell = Array.prototype.filter.call(tablePlaceholder.getElementsByTagName('td'), function (dom) {
151
+ return dom.className.includes('ant-table-cell');
152
+ })[0];
153
+ tableCell.style.height = "".concat(bodyHeight - (rest.scrollY || 0) - 48 - 12, "px");
154
+ }
155
+ // antd6.x 的bug 如果table的高度 没有body 高 则没有滚动条
156
+
124
157
  setState({
125
- scrollY: bodyHeight
158
+ scrollY: tableHeight > bodyHeight ? bodyHeight : undefined
126
159
  });
127
160
  }, {
128
161
  wait: 350
@@ -132,19 +165,24 @@ function VtxTable(props) {
132
165
  var resizeObserver = new ResizeObserver(function () {
133
166
  calculateHeight();
134
167
  });
135
- // componentDidMount
136
168
  if (autoFit && rootDomRef.current) {
137
169
  resizeObserver.observe(rootDomRef.current, {
138
170
  box: 'border-box'
139
171
  });
140
172
  }
141
173
  return function () {
142
- // componentWillUnmount
143
174
  if (autoFit) {
144
175
  resizeObserver.disconnect();
145
176
  }
146
177
  };
147
- }, [autoFit]);
178
+ }, [autoFit, tableSize]);
179
+
180
+ // fix: 最后一页,横向滚动条上移问题
181
+ (0, _react.useEffect)(function () {
182
+ if (scrollY > 0) {
183
+ calculateHeight();
184
+ }
185
+ }, [scrollY]);
148
186
  (0, _react.useLayoutEffect)(function () {
149
187
  if (autoFit) {
150
188
  calculateHeight();
@@ -161,7 +199,7 @@ function VtxTable(props) {
161
199
  showSizeChanger: true,
162
200
  showQuickJumper: true,
163
201
  showTotal: function showTotal(total) {
164
- return "".concat(TextEnum.total, " ").concat(total, " ").concat(TextEnum.item);
202
+ return "".concat(TextEnum.paginationTotalText, " ").concat(total, " ").concat(TextEnum.paginationItemText);
165
203
  }
166
204
  }, pagination);
167
205
  };
@@ -185,9 +223,6 @@ function VtxTable(props) {
185
223
  });
186
224
  };
187
225
  var _tableColumn = loopFilter(counter.tableColumn);
188
- if (!columnsMap['_serialNum']) {
189
- return [];
190
- }
191
226
  return (0, _utils.sortByKeyArrayExtract)(_tableColumn, sortKeyColumns, columnsMap, 'key');
192
227
  }, [columnsMap, counter.tableColumn, sortKeyColumns]);
193
228
 
@@ -225,9 +260,12 @@ function VtxTable(props) {
225
260
  result = _objectSpread(_objectSpread({}, result), {}, {
226
261
  y: scrollY - (rest.scrollY || 0)
227
262
  });
263
+ if (scrollY == undefined) {
264
+ result.y = undefined;
265
+ }
228
266
  }
229
267
  return result;
230
- }, [rest.scroll, rest.scrollY, autoFit]);
268
+ }, [rest.scroll, rest.scrollY, scrollY, autoFit]);
231
269
  var hasAlert = (0, _react.useMemo)(function () {
232
270
  var _rest$rowSelection2;
233
271
  return (((_rest$rowSelection2 = rest.rowSelection) === null || _rest$rowSelection2 === void 0 ? void 0 : _rest$rowSelection2.selectedRowKeys) || []).length > 0;
@@ -236,20 +274,49 @@ function VtxTable(props) {
236
274
  selectedRowKeys: (_rest$rowSelection4 = rest.rowSelection) === null || _rest$rowSelection4 === void 0 ? void 0 : _rest$rowSelection4.selectedRowKeys,
237
275
  onRowSelectionClear: onRowSelectionClear
238
276
  }) : null;
239
- alertHeight.current = !hideSelectionClear && hasAlert ? 49 : 0;
240
- toolbarHeight.current = toolbar ? 56 : 0;
277
+ alertHeight.current = !hideSelectionClear && hasAlert ? DEFAULT_HEIGHTS.ALERT : 0;
278
+ toolbarHeight.current = toolbar ? DEFAULT_HEIGHTS.TOOLBAR : 0;
241
279
  var _useAntdColumnResize = (0, _reactAntdColumnResize.useAntdColumnResize)(function () {
242
280
  return {
243
281
  columns: columns,
244
- minWidth: 20
282
+ minWidth: 10
245
283
  };
246
284
  }, [columns]),
247
285
  resizableColumns = _useAntdColumnResize.resizableColumns,
248
286
  resizeComponents = _useAntdColumnResize.components,
249
287
  tableWidth = _useAntdColumnResize.tableWidth,
250
288
  resetColumns = _useAntdColumnResize.resetColumns;
289
+
290
+ // const _columns = useMemo(() => {
291
+ // let result = [];
292
+ // if (!showTable) {
293
+ // result = []
294
+ // } else if (isDragRef) {
295
+ // result = resizableColumns
296
+ // } else {
297
+ // result = columns
298
+ // }
299
+ // let flag = false;
300
+ // result?.map((v) => {
301
+ // if (columnsMap[v.key].width !== v.width) {
302
+ // flag = true;
303
+ // columnsMap[v.key] = {
304
+ // ...columnsMap[v.key],
305
+ // width: v.width
306
+ // };
307
+ // }
308
+ // })
309
+ // if (flag) {
310
+ // counter.setColumnsMap(
311
+ // columnsMap
312
+ // )
313
+ // }
314
+ // return result;
315
+
316
+ // }, [isDragRef, resizableColumns, showTable, columns, columnsMap])
317
+
318
+ // 1. 先计算列配置
251
319
  var _columns = (0, _react.useMemo)(function () {
252
- var _result;
253
320
  var result = [];
254
321
  if (!showTable) {
255
322
  result = [];
@@ -258,24 +325,30 @@ function VtxTable(props) {
258
325
  } else {
259
326
  result = columns;
260
327
  }
328
+ return result;
329
+ }, [isDragRef, resizableColumns, showTable, columns]);
330
+
331
+ // 2. 在 effect 中同步列宽到 columnsMap
332
+ (0, _react.useEffect)(function () {
333
+ if (!showTable || !_columns.length) return;
261
334
  var flag = false;
262
- (_result = result) === null || _result === void 0 || _result.map(function (v) {
263
- if (columnsMap[v.key].width !== v.width) {
335
+ var newColumnsMap = _objectSpread({}, columnsMap); // 创建副本避免直接修改
336
+
337
+ _columns.forEach(function (v) {
338
+ var _columnsMap$v$key;
339
+ if (((_columnsMap$v$key = columnsMap[v.key]) === null || _columnsMap$v$key === void 0 ? void 0 : _columnsMap$v$key.width) !== v.width) {
264
340
  flag = true;
265
- columnsMap[v.key].width = v.width;
341
+ newColumnsMap[v.key] = _objectSpread(_objectSpread({}, newColumnsMap[v.key]), {}, {
342
+ width: v.width
343
+ });
266
344
  }
267
345
  });
268
346
  if (flag) {
269
- counter.setColumnsMap(columnsMap);
347
+ counter.setColumnsMap(newColumnsMap);
270
348
  }
271
- return result;
272
- }, [isDragRef, resizableColumns, showTable, columns, columnsMap]);
349
+ }, [_columns, columnsMap, counter, showTable]);
273
350
  var _components = (0, _react.useMemo)(function () {
274
- if (isDragRef) {
275
- return resizeComponents;
276
- } else {
277
- return components;
278
- }
351
+ return (0, _mergeComponents.mergeComponentsForResize)(components, resizeComponents, isDragRef);
279
352
  }, [isDragRef, resizeComponents, components]);
280
353
 
281
354
  // 工具栏
@@ -288,7 +361,7 @@ function VtxTable(props) {
288
361
  hideColumnHeight: hideColumnHeight,
289
362
  hideColumnSetting: hideColumnSetting,
290
363
  onRefresh: onRefresh,
291
- columns: _columns,
364
+ columns: tableColumn,
292
365
  onColumnsSave: onColumnsSave,
293
366
  uniqueKey: uniqueKey,
294
367
  prefixUrl: prefixUrl,
@@ -297,20 +370,24 @@ function VtxTable(props) {
297
370
  }) : null;
298
371
  return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
299
372
  id: datagridId,
300
- className: (0, _classnames2.default)(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),
373
+ className: (0, _classnames2.default)(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),
301
374
  ref: rootDomRef,
302
375
  style: style,
303
376
  children: [toolbarRender, alertRender, /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Table, _objectSpread(_objectSpread({
304
377
  size: counter.tableSize,
305
378
  bordered: true
379
+ // virtual
306
380
  }, rest), {}, {
307
381
  dataSource: dataSource,
308
382
  scroll: _objectSpread({
309
383
  x: 'max-content'
310
384
  }, scroll),
311
385
  pagination: getPagination(rest.pagination),
312
- style: {
313
- height: "calc(100% - ".concat(toolbarHeight.current + alertHeight.current, "px)")
386
+ xs: true,
387
+ styles: {
388
+ root: {
389
+ height: "calc(100% - ".concat(toolbarHeight.current + alertHeight.current, "px)")
390
+ }
314
391
  },
315
392
  locale: _objectSpread({
316
393
  emptyText: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Empty, {
@@ -319,6 +396,9 @@ function VtxTable(props) {
319
396
  }, rest.locale),
320
397
  components: _components,
321
398
  columns: _columns
399
+ // tableLayout={'auto'}
400
+ ,
401
+ tableLayout: "fixed"
322
402
  }))]
323
403
  }));
324
404
  }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.mergeComponentsForResize = mergeComponentsForResize;
7
+ 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); }
8
+ 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; }
9
+ 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; }
10
+ 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; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
+ 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); }
13
+ function mergeComponentsForResize(components, resizeComponents, isDragRef) {
14
+ if (!isDragRef) {
15
+ return components;
16
+ }
17
+ return _objectSpread(_objectSpread(_objectSpread({}, resizeComponents || {}), components || {}), {}, {
18
+ header: _objectSpread(_objectSpread({}, (components === null || components === void 0 ? void 0 : components.header) || {}), (resizeComponents === null || resizeComponents === void 0 ? void 0 : resizeComponents.header) || {}),
19
+ body: _objectSpread(_objectSpread({}, (resizeComponents === null || resizeComponents === void 0 ? void 0 : resizeComponents.body) || {}), (components === null || components === void 0 ? void 0 : components.body) || {})
20
+ });
21
+ }
@@ -10,8 +10,15 @@ var _antd = require("antd");
10
10
  var _vtxIcon = _interopRequireDefault(require("../vtx-icon"));
11
11
  var _jsxRuntime = require("react/jsx-runtime");
12
12
  var _react = require("react");
13
- var _excluded = ["confirm"];
13
+ var _excluded = ["confirm"],
14
+ _excluded2 = ["confirm"];
14
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
17
+ 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."); }
18
+ 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); }
19
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
20
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
21
+ 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; }
15
22
  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; }
16
23
  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; }
17
24
  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; }
@@ -19,12 +26,6 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
19
26
  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); }
20
27
  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; }
21
28
  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; }
22
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
23
- 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."); }
24
- 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); }
25
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
26
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
27
- 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; }
28
29
  var renderColumnButtons = function renderColumnButtons(_ref) {
29
30
  var _renderButtons;
30
31
  var renderButtons = _ref.renderButtons,
@@ -51,14 +52,32 @@ var renderColumnButtons = function renderColumnButtons(_ref) {
51
52
  /* eslint-disable */
52
53
  moreRender = /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Dropdown, {
53
54
  menu: {
54
- items: (moreActions === null || moreActions === void 0 ? void 0 : moreActions.map(function (item, i) {
55
+ items: (moreActions === null || moreActions === void 0 ? void 0 : moreActions.map(function (item, index) {
56
+ var name = item.name,
57
+ popconfirm = item.popconfirm;
58
+ if (popconfirm) {
59
+ var confirm = popconfirm.confirm,
60
+ rest = _objectWithoutProperties(popconfirm, _excluded);
61
+ return {
62
+ key: index,
63
+ label: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Popconfirm, _objectSpread(_objectSpread({
64
+ trigger: ['hover'],
65
+ onConfirm: confirm ? function () {
66
+ return confirm(record, index);
67
+ } : undefined
68
+ }, rest), {}, {
69
+ children: name
70
+ }))
71
+ };
72
+ }
55
73
  return {
56
- key: i,
74
+ key: index,
57
75
  label: item.name
58
76
  };
59
77
  })) || [],
60
78
  onClick: function onClick(e) {
61
- moreActions[e.key].onClick(record, index);
79
+ var _moreActions$e$key, _moreActions$e$key$on;
80
+ (_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);
62
81
  }
63
82
  },
64
83
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("a", {
@@ -88,7 +107,7 @@ var renderColumnButtons = function renderColumnButtons(_ref) {
88
107
  }, name);
89
108
  if (popconfirm) {
90
109
  var confirm = popconfirm.confirm,
91
- rest = _objectWithoutProperties(popconfirm, _excluded);
110
+ rest = _objectWithoutProperties(popconfirm, _excluded2);
92
111
  btnNode = /*#__PURE__*/(0, _react.createElement)(_antd.Popconfirm, _objectSpread(_objectSpread({}, rest), {}, {
93
112
  onConfirm: confirm ? function () {
94
113
  return confirm(record, index);
@@ -14,37 +14,85 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
14
14
  var genVtxStyle = function genVtxStyle(token) {
15
15
  var componentCls = token.componentCls,
16
16
  antCls = token.antCls;
17
- return _defineProperty({}, componentCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
17
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty(_defineProperty({
18
18
  position: 'relative',
19
- overflow: 'hidden'
20
- }, "".concat(antCls, "-table-wrapper"), _defineProperty(_defineProperty({}, '.ant-table', _defineProperty(_defineProperty(_defineProperty({}, '.ant-table-header', _defineProperty({}, '.ant-table-thead', {
19
+ // overflow: 'hidden',
20
+ display: 'flex',
21
+ flexDirection: 'column'
22
+ }, "".concat(antCls, "-table-cell-ellipsis"), {
23
+ whiteSpace: "normal"
24
+ }), "".concat(antCls, "-table-wrapper"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "table", {
25
+ // minWidth: "calc(100% - 2px) !important"
26
+ }), '.ant-spin', _defineProperty({
27
+ height: '100%'
28
+ }, '.ant-spin-container', _defineProperty({
29
+ height: '100%',
30
+ display: 'flex',
31
+ flexDirection: 'column'
32
+ }, '.ant-table', _defineProperty({
33
+ // height: '100%',
34
+ flex: 1
35
+ }, '.ant-table-container', _defineProperty(_defineProperty({
36
+ height: '100%',
37
+ borderInlineStart: "none"
38
+ }, '.ant-table-body', {
39
+ scrollbarWidth: "thin"
40
+ }), '.ant-table-content', _defineProperty({
41
+ height: '100%',
42
+ scrollbarWidth: "thin"
43
+ }, 'table', {
44
+ // height: '100%',
45
+ minWidth: "calc(100% - 1px) !important"
46
+ })))))), '.ant-table', _defineProperty(_defineProperty(_defineProperty({}, '.ant-table-header', _defineProperty({}, '.ant-table-thead', {
21
47
  '>tr>th': {
22
- background: token.colorBgContainer
48
+ background: token.colorBgContainer,
49
+ '&:first-child': {
50
+ borderInlineStart: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)"
51
+ }
23
52
  }
24
53
  })), '.ant-table-cell', {
25
- minWidth: 20
26
- }), '.ant-table-body', _defineProperty({}, '.ant-table-tbody', {
54
+ // minWidth: 10,
55
+ }), '.ant-table-tbody', {
56
+ '>tr>td': {
57
+ '&:first-child': {
58
+ borderInlineStart: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)"
59
+ }
60
+ },
27
61
  '>tr.ant-table-placeholder': {
28
62
  position: 'absolute',
29
- top: '25%',
63
+ top: "auto",
64
+ bottom: "auto",
30
65
  right: 0,
31
66
  left: 0,
32
67
  backgroundColor: 'transparent',
33
68
  borderTop: 'none',
69
+ // borderInlineEnd: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
70
+ // borderBottom: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
34
71
  '>td.ant-table-cell': {
35
- display: 'flex',
36
- alignItems: 'center',
37
- justifyContent: 'center',
72
+ padding: 0,
38
73
  width: '100%',
39
74
  height: '100%',
40
- border: 'none'
75
+ border: 'none',
76
+ '>.ant-table-expanded-row-fixed': {
77
+ display: 'flex',
78
+ alignItems: 'center',
79
+ justifyContent: 'center',
80
+ height: '100%',
81
+ width: '100%',
82
+ '&::after': {
83
+ border: 'none'
84
+ }
85
+ }
41
86
  }
42
87
  }
43
- }))), '.ant-pagination', _defineProperty({}, '.ant-pagination-item', {
88
+ })), '.ant-pagination', _defineProperty({
89
+ margin: "var(--ant-margin) 0 0 0"
90
+ }, '.ant-pagination-item', {
44
91
  borderRadius: token.borderRadiusSM
45
- }))), "&-fit", {
46
- height: '100%'
47
- }), "&-noFit", {}), "&-no-border", _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, "".concat(antCls, "-table"), _defineProperty({}, '>.ant-table-container', _defineProperty(_defineProperty({
92
+ })))), "".concat(componentCls, "-fit"), {
93
+ height: '100%',
94
+ minHeight: 200
95
+ }), "".concat(componentCls, "-noFit"), {}), "".concat(componentCls, "-no-border"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, "".concat(antCls, "-table"), _defineProperty({}, '>.ant-table-container', _defineProperty(_defineProperty({
48
96
  borderColor: 'transparent'
49
97
  }, '.ant-table-thead', {
50
98
  '>tr>th': {
@@ -53,10 +101,14 @@ var genVtxStyle = function genVtxStyle(token) {
53
101
  }), '.ant-table-body', {
54
102
  '>table >tbody>tr>td': {
55
103
  borderInlineColor: 'transparent !important'
104
+ },
105
+ '>table >tbody>tr.ant-table-placeholder': {
106
+ borderInlineColor: 'transparent !important',
107
+ borderBottomColor: 'transparent !important'
56
108
  }
57
- }))))), "&.vtx-datagrid-striped", _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, "".concat(antCls, "-table"), _defineProperty({}, '>.ant-table-container', _defineProperty({}, '.ant-table-body', {
109
+ }))))), "".concat(componentCls, "-striped"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, "".concat(antCls, "-table"), _defineProperty({}, '>.ant-table-container', _defineProperty(_defineProperty({}, '.ant-table-body', {
58
110
  '>table >tbody>tr:nth-child(odd)>td': {
59
- backgroundColor: token.colorBgLayout,
111
+ backgroundColor: token.colorBgLayoutTable,
60
112
  '&.ant-table-cell-row-hover': {
61
113
  backgroundColor: token.colorFillAlterSolid
62
114
  }
@@ -70,11 +122,41 @@ var genVtxStyle = function genVtxStyle(token) {
70
122
  backgroundColor: token.controlItemBgActiveHover
71
123
  }
72
124
  }
73
- }))))), "&.vtx-datagrid-header-background", _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-header', _defineProperty({}, '.ant-table-thead', {
125
+ }), '.ant-table-tbody', {
126
+ '>tr:nth-child(odd)>td': {
127
+ backgroundColor: token.colorBgLayoutTable,
128
+ '&.ant-table-cell-row-hover': {
129
+ backgroundColor: token.colorFillAlterSolid
130
+ }
131
+ },
132
+ '>tr:nth-child(odd)>td.ant-table-column-sort': {
133
+ backgroundColor: token.colorFillAlterSolid
134
+ },
135
+ '>tr.ant-table-row-selected:nth-child(odd)>td': {
136
+ backgroundColor: token.controlItemBgActive,
137
+ '&.ant-table-cell-row-hover': {
138
+ backgroundColor: token.controlItemBgActiveHover
139
+ }
140
+ }
141
+ }))))), "".concat(componentCls, "-header-background"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-header', _defineProperty({}, '.ant-table-thead', {
74
142
  '>tr>th': {
75
- background: token.colorBgLayout
143
+ background: token.colorBgLayoutTable
144
+ }
145
+ }))))), "".concat(componentCls, "-no-header-background"), _defineProperty({}, "".concat(antCls, "-table-wrapper "), _defineProperty({}, '.ant-table-thead', {
146
+ '>tr>th': {
147
+ background: token.colorBgContainer
76
148
  }
77
- }))))));
149
+ }))), "".concat(componentCls, "-no-data"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-spin', _defineProperty({}, '.ant-spin-container', _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-container', _defineProperty({
150
+ borderInlineStart: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)"
151
+ }, '.ant-table-content', _defineProperty({
152
+ borderRight: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)",
153
+ borderBottom: "var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)"
154
+ }, '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({
155
+ borderInlineStart: "none"
156
+ }, '.ant-table-content', {
157
+ borderRight: "none",
158
+ borderBottom: "none"
159
+ })))))));
78
160
  };
79
161
  function useStyle(prefix) {
80
162
  return (0, _vtxProvider.useStyle)(prefix, function (token) {