@vtx/components 4.0.0-beta.9 → 4.0.0-beta.91
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.
- package/README.md +19 -19
- package/es/index.js +3 -0
- package/es/utils/components/LabelIconTip/index.js +7 -7
- package/es/utils/conversionMomentValue/index.js +25 -25
- package/es/utils/filterSpecialCharacters.js +6 -6
- package/es/utils/genCopyable/index.js +6 -6
- package/es/utils/getFieldPropsOrFormItemProps/index.js +7 -7
- package/es/utils/hooks/useDebounceFn/index.js +4 -4
- package/es/utils/hooks/useDebounceValue/index.js +6 -6
- package/es/utils/hooks/useDeepCompareMemo/index.js +7 -7
- package/es/utils/hooks/useLatest/index.js +2 -2
- package/es/utils/hooks/useRefCallback/index.js +5 -5
- package/es/utils/index.js +1 -2
- package/es/utils/isBrowser/index.js +7 -7
- package/es/utils/isUrl/index.js +4 -4
- package/es/utils/merge/index.js +4 -4
- package/es/utils/nanoid/index.js +4 -4
- package/es/utils/omitBoolean/index.js +4 -4
- package/es/utils/parseValueToMoment/index.js +4 -4
- package/es/utils/proFieldParsingText/index.js +10 -10
- package/es/utils/transformKeySubmitValue/index.js +57 -57
- package/es/utils/useEditableArray/index.js +46 -46
- package/es/utils/useEditableMap/index.js +22 -22
- package/es/utils/useMediaQuery/index.js +5 -5
- package/es/vtx-combogrid/Combogrid.js +5 -4
- package/es/vtx-combogrid/index.js +7 -4
- package/es/vtx-datagrid/Store/Provide.js +109 -140
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -6
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/es/vtx-datagrid/ToolBar/index.js +2 -1
- package/es/vtx-datagrid/ToolBar/style.js +6 -3
- package/es/vtx-datagrid/columnState.js +91 -0
- package/es/vtx-datagrid/index.js +134 -37
- package/es/vtx-datagrid/mergeComponents.js +15 -0
- package/es/vtx-datagrid/renderColumnButtons.js +30 -11
- package/es/vtx-datagrid/style/index.js +108 -18
- package/es/vtx-datagrid/style/index.less +242 -242
- package/es/vtx-date-picker/QdatePicker.js +1 -1
- package/es/vtx-date-picker/style/index.less +39 -39
- package/es/vtx-descriptions/Descriptions.js +29 -0
- package/es/vtx-descriptions/index.js +3 -0
- package/es/vtx-descriptions/style/index.js +19 -0
- package/es/vtx-ellipsis-text/index.js +2 -2
- package/es/vtx-ellipsis-text/style/index.js +3 -1
- package/es/vtx-export/index.js +33 -38
- package/es/vtx-export-async/History.js +15 -7
- package/es/vtx-export-async/index.js +18 -8
- package/es/vtx-export-async/util.js +16 -5
- package/es/vtx-form-layout/FormItem.js +16 -16
- package/es/vtx-form-layout/style/index.js +6 -4
- package/es/vtx-icon/index.js +54 -45
- package/es/vtx-icon/index.js1 +90 -0
- package/es/vtx-image/style/index.js +0 -1
- package/es/vtx-import/index.js +143 -42
- package/es/vtx-import/result.js +28 -26
- package/es/vtx-import/style/index.js +16 -1
- package/es/vtx-import2/Content.js +2 -1
- package/es/vtx-import2/index.js +29 -19
- package/es/vtx-import2/style/index.js +59 -8
- package/es/vtx-modal/index.js +11 -6
- package/es/vtx-modal/style/index.js +5 -2
- package/es/vtx-page-layout/Basic.js +2 -2
- package/es/vtx-page-layout/TabLayout.js +6 -6
- package/es/vtx-page-layout/TableLayout.js +10 -10
- package/es/vtx-page-layout/TreeLayout.js +6 -6
- package/es/vtx-page-layout/container.js +2 -2
- package/es/vtx-page-layout/style/index.js +4 -2
- package/es/vtx-provider/index.js +33 -31
- package/es/vtx-provider/intl.js +9 -9
- package/es/vtx-provider/locale/en_GB.js +1 -1
- package/es/vtx-provider/locale/en_US.js +58 -4
- package/es/vtx-provider/locale/zh_CN.js +57 -3
- package/es/vtx-provider/useStyle/index.js +17 -17
- package/es/vtx-search/index.js +30 -12
- package/es/vtx-search/style/index.js +6 -3
- package/es/vtx-select/index.js +123 -40
- package/es/vtx-select/style/index.js +11 -56
- package/es/vtx-split-pane/Resizer.js +0 -1
- package/es/vtx-split-pane/SplitPane.js +42 -34
- package/es/vtx-split-pane/style/index.js +8 -112
- package/es/vtx-statistics-column/style/index.js +1 -1
- package/es/vtx-time-picker/index.js +27 -1
- package/es/vtx-transfer/Transfer.js +29 -0
- package/es/vtx-transfer/index.js +3 -0
- package/es/vtx-transfer/style/index.js +19 -0
- package/es/vtx-transfer-select/TransferSelect.js +143 -0
- package/es/vtx-transfer-select/index.js +3 -0
- package/es/vtx-transfer-select/style/index.js +19 -0
- package/es/vtx-tree/index.js +27 -9
- package/es/vtx-tree-select/index.js +81 -110
- package/es/vtx-tree-select/style/index.js +9 -3
- package/es/vtx-upload/FilePreview.js +2 -1
- package/es/vtx-wang-editor/index.js +41 -32
- package/es/vtx-wang-editor/style/index.less +12 -12
- package/lib/index.js +36 -0
- package/lib/utils/components/LabelIconTip/index.js +7 -7
- package/lib/utils/conversionMomentValue/index.js +25 -25
- package/lib/utils/filterSpecialCharacters.js +6 -6
- package/lib/utils/genCopyable/index.js +6 -6
- package/lib/utils/getFieldPropsOrFormItemProps/index.js +7 -7
- package/lib/utils/hooks/useDebounceFn/index.js +4 -4
- package/lib/utils/hooks/useDebounceValue/index.js +6 -6
- package/lib/utils/hooks/useDeepCompareMemo/index.js +7 -7
- package/lib/utils/hooks/useLatest/index.js +2 -2
- package/lib/utils/hooks/useRefCallback/index.js +5 -5
- package/lib/utils/index.js +0 -7
- package/lib/utils/isBrowser/index.js +7 -7
- package/lib/utils/isUrl/index.js +4 -4
- package/lib/utils/merge/index.js +4 -4
- package/lib/utils/nanoid/index.js +4 -4
- package/lib/utils/omitBoolean/index.js +4 -4
- package/lib/utils/parseValueToMoment/index.js +4 -4
- package/lib/utils/proFieldParsingText/index.js +10 -10
- package/lib/utils/transformKeySubmitValue/index.js +57 -57
- package/lib/utils/useEditableArray/index.js +46 -46
- package/lib/utils/useEditableMap/index.js +22 -22
- package/lib/utils/useMediaQuery/index.js +5 -5
- package/lib/vtx-combogrid/Combogrid.js +5 -4
- package/lib/vtx-combogrid/index.js +7 -4
- package/lib/vtx-datagrid/Store/Provide.js +112 -142
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -6
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/lib/vtx-datagrid/ToolBar/index.js +2 -1
- package/lib/vtx-datagrid/ToolBar/style.js +6 -3
- package/lib/vtx-datagrid/columnState.js +100 -0
- package/lib/vtx-datagrid/index.js +134 -37
- package/lib/vtx-datagrid/mergeComponents.js +21 -0
- package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
- package/lib/vtx-datagrid/style/index.js +108 -18
- package/lib/vtx-datagrid/style/index.less +242 -242
- package/lib/vtx-date-picker/QdatePicker.js +1 -1
- package/lib/vtx-date-picker/style/index.less +39 -39
- package/lib/vtx-descriptions/Descriptions.js +38 -0
- package/lib/vtx-descriptions/index.js +15 -0
- package/lib/vtx-descriptions/style/index.js +25 -0
- package/lib/vtx-ellipsis-text/index.js +2 -2
- package/lib/vtx-ellipsis-text/style/index.js +3 -1
- package/lib/vtx-export/index.js +34 -39
- package/lib/vtx-export-async/History.js +14 -8
- package/lib/vtx-export-async/index.js +18 -8
- package/lib/vtx-export-async/util.js +16 -5
- package/lib/vtx-form-layout/FormItem.js +16 -16
- package/lib/vtx-form-layout/style/index.js +6 -4
- package/lib/vtx-icon/index.js +54 -52
- package/lib/vtx-icon/index.js1 +90 -0
- package/lib/vtx-image/style/index.js +0 -1
- package/lib/vtx-import/index.js +141 -43
- package/lib/vtx-import/result.js +29 -27
- package/lib/vtx-import/style/index.js +16 -1
- package/lib/vtx-import2/Content.js +2 -1
- package/lib/vtx-import2/index.js +29 -19
- package/lib/vtx-import2/style/index.js +59 -8
- package/lib/vtx-modal/index.js +11 -6
- package/lib/vtx-modal/style/index.js +5 -2
- package/lib/vtx-page-layout/Basic.js +2 -2
- package/lib/vtx-page-layout/TabLayout.js +6 -6
- package/lib/vtx-page-layout/TableLayout.js +10 -10
- package/lib/vtx-page-layout/TreeLayout.js +6 -6
- package/lib/vtx-page-layout/container.js +2 -2
- package/lib/vtx-page-layout/style/index.js +4 -2
- package/lib/vtx-provider/index.js +33 -31
- package/lib/vtx-provider/intl.js +9 -9
- package/lib/vtx-provider/locale/en_GB.js +1 -1
- package/lib/vtx-provider/locale/en_US.js +58 -4
- package/lib/vtx-provider/locale/zh_CN.js +57 -3
- package/lib/vtx-provider/useStyle/index.js +17 -17
- package/lib/vtx-search/index.js +32 -12
- package/lib/vtx-search/style/index.js +6 -3
- package/lib/vtx-select/index.js +125 -42
- package/lib/vtx-select/style/index.js +11 -56
- package/lib/vtx-split-pane/Resizer.js +0 -1
- package/lib/vtx-split-pane/SplitPane.js +40 -31
- package/lib/vtx-split-pane/style/index.js +8 -112
- package/lib/vtx-statistics-column/style/index.js +1 -1
- package/lib/vtx-time-picker/index.js +27 -1
- package/lib/vtx-transfer/Transfer.js +38 -0
- package/lib/vtx-transfer/index.js +15 -0
- package/lib/vtx-transfer/style/index.js +25 -0
- package/lib/vtx-transfer-select/TransferSelect.js +151 -0
- package/lib/vtx-transfer-select/index.js +15 -0
- package/lib/vtx-transfer-select/style/index.js +25 -0
- package/lib/vtx-tree/index.js +27 -9
- package/lib/vtx-tree-select/index.js +81 -112
- package/lib/vtx-tree-select/style/index.js +9 -3
- package/lib/vtx-upload/FilePreview.js +2 -1
- package/lib/vtx-wang-editor/index.js +39 -30
- package/lib/vtx-wang-editor/style/index.less +12 -12
- package/package.json +239 -238
- package/es/utils/hooks/useFetchData/index.js +0 -82
- package/lib/utils/hooks/useFetchData/index.js +0 -89
|
@@ -12,16 +12,17 @@ var _antd = require("antd");
|
|
|
12
12
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
var _reactAntdColumnResize = require("react-antd-column-resize");
|
|
15
16
|
var _utils = require("../utils");
|
|
16
17
|
var _useSet3 = _interopRequireDefault(require("../utils/useSet"));
|
|
18
|
+
var _vtxProvider = require("../vtx-provider");
|
|
17
19
|
var _Alert = _interopRequireDefault(require("./Alert"));
|
|
18
|
-
var _ToolBar = _interopRequireDefault(require("./ToolBar"));
|
|
19
20
|
var _Provide = require("./Store/Provide");
|
|
21
|
+
var _ToolBar = _interopRequireDefault(require("./ToolBar"));
|
|
22
|
+
var _mergeComponents = require("./mergeComponents");
|
|
20
23
|
var _index = require("./style/index");
|
|
21
|
-
var _reactAntdColumnResize = require("react-antd-column-resize");
|
|
22
|
-
var _vtxProvider = require("../vtx-provider");
|
|
23
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
|
-
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"];
|
|
25
|
+
var _excluded = ["toolbar", "toolbarClassName", "toolbarTilte", "buttonGroup", "refreshIconVisible", "fullScreenVisible", "hideColumnSetting", "hideColumnHeight", "onRefresh", "bordered", "startIndex", "autoFit", "headFootHeight", "columnResizable", "components", "className", "style", "emptyText", "onRowSelectionClear", "onColumnsSave", "uniqueKey", "prefixUrl", "hideSelectionClear", "customEnumText"];
|
|
25
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); }
|
|
26
27
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
27
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -42,8 +43,8 @@ var isMac = navigator.userAgent.indexOf('Mac OS') !== -1;
|
|
|
42
43
|
var indexColumnKey = exports.indexColumnKey = '_serialNum';
|
|
43
44
|
var DEFAULT_HEIGHTS = exports.DEFAULT_HEIGHTS = {
|
|
44
45
|
HEAD_FOOT: 115,
|
|
45
|
-
ALERT:
|
|
46
|
-
TOOLBAR:
|
|
46
|
+
ALERT: 48,
|
|
47
|
+
TOOLBAR: 64
|
|
47
48
|
};
|
|
48
49
|
function VtxTable(props) {
|
|
49
50
|
var _rest$dataSource, _rest$rowSelection, _rest$rowSelection3, _rest$rowSelection4;
|
|
@@ -62,17 +63,19 @@ function VtxTable(props) {
|
|
|
62
63
|
isDragRef = _useContext2.isDragRef,
|
|
63
64
|
rootDomRef = _useContext2.rootDomRef,
|
|
64
65
|
sortKeyColumns = _useContext2.sortKeyColumns,
|
|
65
|
-
TextEnum = _useContext2.TextEnum
|
|
66
|
+
TextEnum = _useContext2.TextEnum,
|
|
67
|
+
tableSize = _useContext2.tableSize;
|
|
66
68
|
var _useSet = (0, _useSet3.default)({
|
|
67
69
|
// 表格id
|
|
68
70
|
datagridId: "vtx-datagrid-".concat(new Date().getTime()),
|
|
69
|
-
scrollY:
|
|
71
|
+
scrollY: undefined
|
|
70
72
|
}),
|
|
71
73
|
_useSet2 = _slicedToArray(_useSet, 2),
|
|
72
74
|
_useSet2$ = _useSet2[0],
|
|
73
75
|
datagridId = _useSet2$.datagridId,
|
|
74
76
|
scrollY = _useSet2$.scrollY,
|
|
75
77
|
setState = _useSet2[1];
|
|
78
|
+
var scrollYRef = (0, _react.useRef)(undefined);
|
|
76
79
|
// 列设置提示高度
|
|
77
80
|
var alertHeight = (0, _react.useRef)(0);
|
|
78
81
|
// 工具栏高度
|
|
@@ -87,6 +90,8 @@ function VtxTable(props) {
|
|
|
87
90
|
buttonGroup = props.buttonGroup,
|
|
88
91
|
_props$refreshIconVis = props.refreshIconVisible,
|
|
89
92
|
refreshIconVisible = _props$refreshIconVis === void 0 ? true : _props$refreshIconVis,
|
|
93
|
+
_props$fullScreenVisi = props.fullScreenVisible,
|
|
94
|
+
fullScreenVisible = _props$fullScreenVisi === void 0 ? false : _props$fullScreenVisi,
|
|
90
95
|
hideColumnSetting = props.hideColumnSetting,
|
|
91
96
|
hideColumnHeight = props.hideColumnHeight,
|
|
92
97
|
onRefresh = props.onRefresh,
|
|
@@ -117,25 +122,65 @@ function VtxTable(props) {
|
|
|
117
122
|
|
|
118
123
|
// 高度计算
|
|
119
124
|
var _useThrottleFn = (0, _ahooks.useThrottleFn)(function () {
|
|
120
|
-
var _rootDomRef$current;
|
|
125
|
+
var _rootDomRef$current, _bodyDiv$getElementsB;
|
|
121
126
|
if (!rootDomRef.current) {
|
|
122
127
|
return null;
|
|
123
128
|
}
|
|
124
|
-
var bodyHeight = ((_rootDomRef$current = rootDomRef.current) === null || _rootDomRef$current === void 0 ? void 0 : _rootDomRef$current.clientHeight) - headFootHeight - toolbarHeight.current - alertHeight.current;
|
|
125
129
|
var divs = rootDomRef.current.getElementsByTagName('div');
|
|
130
|
+
var pagination = Array.prototype.filter.call(rootDomRef.current.getElementsByTagName('ul'), function (dom) {
|
|
131
|
+
return dom.className.includes('ant-pagination');
|
|
132
|
+
})[0];
|
|
133
|
+
var tableHeader = Array.prototype.filter.call(rootDomRef.current.getElementsByTagName('thead'), function (dom) {
|
|
134
|
+
return dom.className.includes('ant-table-thead');
|
|
135
|
+
})[0];
|
|
136
|
+
var _headFootHeight = headFootHeight;
|
|
137
|
+
if (tableHeader) {
|
|
138
|
+
_headFootHeight = (pagination ? ((pagination === null || pagination === void 0 ? void 0 : pagination.clientHeight) || 0) + 32 : 0) + (tableHeader === null || tableHeader === void 0 ? void 0 : tableHeader.clientHeight);
|
|
139
|
+
}
|
|
140
|
+
var bodyHeight = ((_rootDomRef$current = rootDomRef.current) === null || _rootDomRef$current === void 0 ? void 0 : _rootDomRef$current.clientHeight) - _headFootHeight - toolbarHeight.current - alertHeight.current;
|
|
141
|
+
if (!bodyHeight || bodyHeight <= 0) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
126
144
|
var bodyDiv = Array.prototype.filter.call(divs, function (dom) {
|
|
127
|
-
return dom.className.includes('ant-table-body') || dom.className.includes('ant-table-content');
|
|
145
|
+
return dom.className.includes('ant-table-body') || dom.className.includes('ant-table-content') || dom.className.includes('ant-table-tbody');
|
|
128
146
|
})[0];
|
|
147
|
+
var tablePlaceholder = Array.prototype.filter.call(rootDomRef.current.getElementsByTagName('tr'), function (dom) {
|
|
148
|
+
return dom.className.includes('ant-table-placeholder');
|
|
149
|
+
})[0];
|
|
150
|
+
if (!bodyDiv) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
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;
|
|
154
|
+
var minBodyHeight = Math.max(bodyHeight - (rest.scrollY || 0), 0);
|
|
129
155
|
if (bodyDiv) {
|
|
130
|
-
bodyDiv.style.minHeight = "".concat(
|
|
156
|
+
bodyDiv.style.minHeight = "".concat(minBodyHeight, "px");
|
|
157
|
+
}
|
|
158
|
+
if (tablePlaceholder) {
|
|
159
|
+
var placeholderHeight = Math.max(bodyHeight - (rest.scrollY || 0) - 48 - 12, 0);
|
|
160
|
+
tablePlaceholder.style.height = "".concat(placeholderHeight, "px");
|
|
161
|
+
var tableCell = Array.prototype.filter.call(tablePlaceholder.getElementsByTagName('td'), function (dom) {
|
|
162
|
+
return dom.className.includes('ant-table-cell');
|
|
163
|
+
})[0];
|
|
164
|
+
if (tableCell) {
|
|
165
|
+
tableCell.style.height = "".concat(placeholderHeight, "px");
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
// antd6.x 的bug 如果table的高度 没有body 高 则没有滚动条
|
|
169
|
+
|
|
170
|
+
var nextScrollY = tableHeight > minBodyHeight ? minBodyHeight : undefined;
|
|
171
|
+
if (scrollYRef.current !== nextScrollY) {
|
|
172
|
+
scrollYRef.current = nextScrollY;
|
|
173
|
+
setState({
|
|
174
|
+
scrollY: nextScrollY
|
|
175
|
+
});
|
|
131
176
|
}
|
|
132
|
-
setState({
|
|
133
|
-
scrollY: bodyHeight
|
|
134
|
-
});
|
|
135
177
|
}, {
|
|
136
178
|
wait: 350
|
|
137
179
|
}),
|
|
138
180
|
calculateHeight = _useThrottleFn.run;
|
|
181
|
+
(0, _react.useEffect)(function () {
|
|
182
|
+
scrollYRef.current = scrollY;
|
|
183
|
+
}, [scrollY]);
|
|
139
184
|
(0, _react.useEffect)(function () {
|
|
140
185
|
var resizeObserver = new ResizeObserver(function () {
|
|
141
186
|
calculateHeight();
|
|
@@ -150,7 +195,14 @@ function VtxTable(props) {
|
|
|
150
195
|
resizeObserver.disconnect();
|
|
151
196
|
}
|
|
152
197
|
};
|
|
153
|
-
}, [autoFit]);
|
|
198
|
+
}, [autoFit, tableSize]);
|
|
199
|
+
|
|
200
|
+
// fix: 最后一页,横向滚动条上移问题
|
|
201
|
+
(0, _react.useEffect)(function () {
|
|
202
|
+
if (scrollY > 0) {
|
|
203
|
+
calculateHeight();
|
|
204
|
+
}
|
|
205
|
+
}, [scrollY]);
|
|
154
206
|
(0, _react.useLayoutEffect)(function () {
|
|
155
207
|
if (autoFit) {
|
|
156
208
|
calculateHeight();
|
|
@@ -168,7 +220,8 @@ function VtxTable(props) {
|
|
|
168
220
|
showQuickJumper: true,
|
|
169
221
|
showTotal: function showTotal(total) {
|
|
170
222
|
return "".concat(TextEnum.paginationTotalText, " ").concat(total, " ").concat(TextEnum.paginationItemText);
|
|
171
|
-
}
|
|
223
|
+
},
|
|
224
|
+
size: 'medium'
|
|
172
225
|
}, pagination);
|
|
173
226
|
};
|
|
174
227
|
// 先排序,排序的结果给列设置作用
|
|
@@ -191,9 +244,6 @@ function VtxTable(props) {
|
|
|
191
244
|
});
|
|
192
245
|
};
|
|
193
246
|
var _tableColumn = loopFilter(counter.tableColumn);
|
|
194
|
-
if (!columnsMap['_serialNum']) {
|
|
195
|
-
return [];
|
|
196
|
-
}
|
|
197
247
|
return (0, _utils.sortByKeyArrayExtract)(_tableColumn, sortKeyColumns, columnsMap, 'key');
|
|
198
248
|
}, [columnsMap, counter.tableColumn, sortKeyColumns]);
|
|
199
249
|
|
|
@@ -231,9 +281,12 @@ function VtxTable(props) {
|
|
|
231
281
|
result = _objectSpread(_objectSpread({}, result), {}, {
|
|
232
282
|
y: scrollY - (rest.scrollY || 0)
|
|
233
283
|
});
|
|
284
|
+
if (scrollY == undefined) {
|
|
285
|
+
result.y = undefined;
|
|
286
|
+
}
|
|
234
287
|
}
|
|
235
288
|
return result;
|
|
236
|
-
}, [rest.scroll, rest.scrollY, autoFit]);
|
|
289
|
+
}, [rest.scroll, rest.scrollY, scrollY, autoFit]);
|
|
237
290
|
var hasAlert = (0, _react.useMemo)(function () {
|
|
238
291
|
var _rest$rowSelection2;
|
|
239
292
|
return (((_rest$rowSelection2 = rest.rowSelection) === null || _rest$rowSelection2 === void 0 ? void 0 : _rest$rowSelection2.selectedRowKeys) || []).length > 0;
|
|
@@ -247,15 +300,44 @@ function VtxTable(props) {
|
|
|
247
300
|
var _useAntdColumnResize = (0, _reactAntdColumnResize.useAntdColumnResize)(function () {
|
|
248
301
|
return {
|
|
249
302
|
columns: columns,
|
|
250
|
-
minWidth:
|
|
303
|
+
minWidth: 10
|
|
251
304
|
};
|
|
252
305
|
}, [columns]),
|
|
253
306
|
resizableColumns = _useAntdColumnResize.resizableColumns,
|
|
254
307
|
resizeComponents = _useAntdColumnResize.components,
|
|
255
308
|
tableWidth = _useAntdColumnResize.tableWidth,
|
|
256
309
|
resetColumns = _useAntdColumnResize.resetColumns;
|
|
310
|
+
|
|
311
|
+
// const _columns = useMemo(() => {
|
|
312
|
+
// let result = [];
|
|
313
|
+
// if (!showTable) {
|
|
314
|
+
// result = []
|
|
315
|
+
// } else if (isDragRef) {
|
|
316
|
+
// result = resizableColumns
|
|
317
|
+
// } else {
|
|
318
|
+
// result = columns
|
|
319
|
+
// }
|
|
320
|
+
// let flag = false;
|
|
321
|
+
// result?.map((v) => {
|
|
322
|
+
// if (columnsMap[v.key].width !== v.width) {
|
|
323
|
+
// flag = true;
|
|
324
|
+
// columnsMap[v.key] = {
|
|
325
|
+
// ...columnsMap[v.key],
|
|
326
|
+
// width: v.width
|
|
327
|
+
// };
|
|
328
|
+
// }
|
|
329
|
+
// })
|
|
330
|
+
// if (flag) {
|
|
331
|
+
// counter.setColumnsMap(
|
|
332
|
+
// columnsMap
|
|
333
|
+
// )
|
|
334
|
+
// }
|
|
335
|
+
// return result;
|
|
336
|
+
|
|
337
|
+
// }, [isDragRef, resizableColumns, showTable, columns, columnsMap])
|
|
338
|
+
|
|
339
|
+
// 1. 先计算列配置
|
|
257
340
|
var _columns = (0, _react.useMemo)(function () {
|
|
258
|
-
var _result;
|
|
259
341
|
var result = [];
|
|
260
342
|
if (!showTable) {
|
|
261
343
|
result = [];
|
|
@@ -264,24 +346,30 @@ function VtxTable(props) {
|
|
|
264
346
|
} else {
|
|
265
347
|
result = columns;
|
|
266
348
|
}
|
|
349
|
+
return result;
|
|
350
|
+
}, [isDragRef, resizableColumns, showTable, columns]);
|
|
351
|
+
|
|
352
|
+
// 2. 在 effect 中同步列宽到 columnsMap
|
|
353
|
+
(0, _react.useEffect)(function () {
|
|
354
|
+
if (!showTable || !_columns.length) return;
|
|
267
355
|
var flag = false;
|
|
268
|
-
|
|
269
|
-
|
|
356
|
+
var newColumnsMap = _objectSpread({}, columnsMap); // 创建副本避免直接修改
|
|
357
|
+
|
|
358
|
+
_columns.forEach(function (v) {
|
|
359
|
+
var _columnsMap$v$key;
|
|
360
|
+
if (((_columnsMap$v$key = columnsMap[v.key]) === null || _columnsMap$v$key === void 0 ? void 0 : _columnsMap$v$key.width) !== v.width) {
|
|
270
361
|
flag = true;
|
|
271
|
-
|
|
362
|
+
newColumnsMap[v.key] = _objectSpread(_objectSpread({}, newColumnsMap[v.key]), {}, {
|
|
363
|
+
width: v.width
|
|
364
|
+
});
|
|
272
365
|
}
|
|
273
366
|
});
|
|
274
367
|
if (flag) {
|
|
275
|
-
counter.setColumnsMap(
|
|
368
|
+
counter.setColumnsMap(newColumnsMap);
|
|
276
369
|
}
|
|
277
|
-
|
|
278
|
-
}, [isDragRef, resizableColumns, showTable, columns, columnsMap]);
|
|
370
|
+
}, [_columns, columnsMap, counter, showTable]);
|
|
279
371
|
var _components = (0, _react.useMemo)(function () {
|
|
280
|
-
|
|
281
|
-
return resizeComponents;
|
|
282
|
-
} else {
|
|
283
|
-
return components;
|
|
284
|
-
}
|
|
372
|
+
return (0, _mergeComponents.mergeComponentsForResize)(components, resizeComponents, isDragRef);
|
|
285
373
|
}, [isDragRef, resizeComponents, components]);
|
|
286
374
|
|
|
287
375
|
// 工具栏
|
|
@@ -291,6 +379,7 @@ function VtxTable(props) {
|
|
|
291
379
|
toolbarTilte: toolbarTilte,
|
|
292
380
|
buttonGroup: buttonGroup,
|
|
293
381
|
refreshIconVisible: refreshIconVisible,
|
|
382
|
+
fullScreenVisible: fullScreenVisible,
|
|
294
383
|
hideColumnHeight: hideColumnHeight,
|
|
295
384
|
hideColumnSetting: hideColumnSetting,
|
|
296
385
|
onRefresh: onRefresh,
|
|
@@ -303,20 +392,24 @@ function VtxTable(props) {
|
|
|
303
392
|
}) : null;
|
|
304
393
|
return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
305
394
|
id: datagridId,
|
|
306
|
-
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),
|
|
395
|
+
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),
|
|
307
396
|
ref: rootDomRef,
|
|
308
397
|
style: style,
|
|
309
398
|
children: [toolbarRender, alertRender, /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Table, _objectSpread(_objectSpread({
|
|
310
399
|
size: counter.tableSize,
|
|
311
400
|
bordered: true
|
|
401
|
+
// virtual
|
|
312
402
|
}, rest), {}, {
|
|
313
403
|
dataSource: dataSource,
|
|
314
404
|
scroll: _objectSpread({
|
|
315
405
|
x: 'max-content'
|
|
316
406
|
}, scroll),
|
|
317
407
|
pagination: getPagination(rest.pagination),
|
|
318
|
-
|
|
319
|
-
|
|
408
|
+
xs: true,
|
|
409
|
+
styles: {
|
|
410
|
+
root: {
|
|
411
|
+
height: "calc(100% - ".concat(toolbarHeight.current + alertHeight.current, "px)")
|
|
412
|
+
}
|
|
320
413
|
},
|
|
321
414
|
locale: _objectSpread({
|
|
322
415
|
emptyText: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Empty, {
|
|
@@ -325,6 +418,9 @@ function VtxTable(props) {
|
|
|
325
418
|
}, rest.locale),
|
|
326
419
|
components: _components,
|
|
327
420
|
columns: _columns
|
|
421
|
+
// tableLayout={'auto'}
|
|
422
|
+
,
|
|
423
|
+
tableLayout: "fixed"
|
|
328
424
|
}))]
|
|
329
425
|
}));
|
|
330
426
|
}
|
|
@@ -342,6 +438,7 @@ var _default = exports.default = VtxDatagrid;
|
|
|
342
438
|
VtxDatagrid.propTypes = {
|
|
343
439
|
prefix: _propTypes.default.string,
|
|
344
440
|
refreshIconVisible: _propTypes.default.bool,
|
|
441
|
+
fullScreenVisible: _propTypes.default.bool,
|
|
345
442
|
hideColumnSetting: _propTypes.default.bool,
|
|
346
443
|
hideSelectionClear: _propTypes.default.bool,
|
|
347
444
|
hideColumnHeight: _propTypes.default.bool,
|
|
@@ -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,
|
|
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:
|
|
74
|
+
key: index,
|
|
57
75
|
label: item.name
|
|
58
76
|
};
|
|
59
77
|
})) || [],
|
|
60
78
|
onClick: function onClick(e) {
|
|
61
|
-
|
|
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,
|
|
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(
|
|
17
|
+
return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty(_defineProperty({
|
|
18
18
|
position: 'relative',
|
|
19
|
-
overflow: 'hidden'
|
|
20
|
-
|
|
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, .ant-spin-nested-loading', _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:
|
|
26
|
-
}), '.ant-table-
|
|
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: '
|
|
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
|
-
|
|
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
|
-
}))
|
|
88
|
+
})), '.ant-pagination', _defineProperty({
|
|
89
|
+
margin: 'var(--ant-margin) 0 0 0'
|
|
90
|
+
}, '.ant-pagination-item', {
|
|
44
91
|
borderRadius: token.borderRadiusSM
|
|
45
|
-
}))), "
|
|
46
|
-
height: '100%'
|
|
47
|
-
|
|
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(_defineProperty({
|
|
48
96
|
borderColor: 'transparent'
|
|
49
97
|
}, '.ant-table-thead', {
|
|
50
98
|
'>tr>th': {
|
|
@@ -53,8 +101,20 @@ 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
|
-
})
|
|
109
|
+
}), '.ant-table-content', {
|
|
110
|
+
'>table >tbody>tr>td': {
|
|
111
|
+
borderInlineColor: 'transparent !important'
|
|
112
|
+
},
|
|
113
|
+
'>table >tbody>tr.ant-table-placeholder': {
|
|
114
|
+
borderInlineColor: 'transparent !important',
|
|
115
|
+
borderBottomColor: 'transparent !important'
|
|
116
|
+
}
|
|
117
|
+
}))))), "".concat(componentCls, "-striped"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, "".concat(antCls, "-table"), _defineProperty({}, '>.ant-table-container', _defineProperty(_defineProperty({}, '.ant-table-body', {
|
|
58
118
|
'>table >tbody>tr:nth-child(odd)>td': {
|
|
59
119
|
backgroundColor: token.colorBgLayoutTable,
|
|
60
120
|
'&.ant-table-cell-row-hover': {
|
|
@@ -70,11 +130,41 @@ var genVtxStyle = function genVtxStyle(token) {
|
|
|
70
130
|
backgroundColor: token.controlItemBgActiveHover
|
|
71
131
|
}
|
|
72
132
|
}
|
|
73
|
-
})
|
|
133
|
+
}), '.ant-table-tbody', {
|
|
134
|
+
'>tr:nth-child(odd)>td': {
|
|
135
|
+
backgroundColor: token.colorBgLayoutTable,
|
|
136
|
+
'&.ant-table-cell-row-hover': {
|
|
137
|
+
backgroundColor: token.colorFillAlterSolid
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
'>tr:nth-child(odd)>td.ant-table-column-sort': {
|
|
141
|
+
backgroundColor: token.colorFillAlterSolid
|
|
142
|
+
},
|
|
143
|
+
'>tr.ant-table-row-selected:nth-child(odd)>td': {
|
|
144
|
+
backgroundColor: token.controlItemBgActive,
|
|
145
|
+
'&.ant-table-cell-row-hover': {
|
|
146
|
+
backgroundColor: token.controlItemBgActiveHover
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}))))), "".concat(componentCls, "-header-background"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-header', _defineProperty({}, '.ant-table-thead', {
|
|
74
150
|
'>tr>th': {
|
|
75
151
|
background: token.colorBgLayoutTable
|
|
76
152
|
}
|
|
77
|
-
}))))))
|
|
153
|
+
}))))), "".concat(componentCls, "-no-header-background"), _defineProperty({}, "".concat(antCls, "-table-wrapper "), _defineProperty({}, '.ant-table-thead', {
|
|
154
|
+
'>tr>th': {
|
|
155
|
+
background: token.colorBgContainer
|
|
156
|
+
}
|
|
157
|
+
}))), "".concat(componentCls, "-no-data"), _defineProperty({}, "".concat(antCls, "-table-wrapper"), _defineProperty({}, '.ant-spin', _defineProperty({}, '.ant-spin-container', _defineProperty({}, '.ant-table', _defineProperty({}, '.ant-table-container', _defineProperty({
|
|
158
|
+
borderInlineStart: 'var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)'
|
|
159
|
+
}, '.ant-table-content', _defineProperty({
|
|
160
|
+
borderRight: 'var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)',
|
|
161
|
+
borderBottom: 'var(--ant-line-width) var(--ant-line-type) var(--ant-table-border-color)'
|
|
162
|
+
}, '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({
|
|
163
|
+
borderInlineStart: 'none'
|
|
164
|
+
}, '.ant-table-content', {
|
|
165
|
+
borderRight: 'none',
|
|
166
|
+
borderBottom: 'none'
|
|
167
|
+
})))))));
|
|
78
168
|
};
|
|
79
169
|
function useStyle(prefix) {
|
|
80
170
|
return (0, _vtxProvider.useStyle)(prefix, function (token) {
|