@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.
- package/es/index.js +3 -0
- package/es/utils/filterSpecialCharacters.js +47 -46
- package/es/utils/index.js +1 -2
- package/es/vtx-combogrid/Combogrid.js +5 -4
- package/es/vtx-combogrid/index.js +7 -4
- package/es/vtx-datagrid/Store/Provide.js +106 -137
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -3
- package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/es/vtx-datagrid/columnState.js +91 -0
- package/es/vtx-datagrid/index.js +124 -32
- package/es/vtx-datagrid/mergeComponents.js +15 -0
- package/es/vtx-datagrid/renderColumnButtons.js +30 -11
- package/es/vtx-datagrid/style/index.js +102 -20
- package/es/vtx-date-picker/QdatePicker.js +1 -1
- 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 +7 -2
- package/es/vtx-ellipsis-text/style/index.js +3 -1
- package/es/vtx-export/index.js +25 -25
- package/es/vtx-export-async/History.js +11 -3
- package/es/vtx-export-async/index.js +45 -15
- package/es/vtx-export-async/util.js +16 -5
- package/es/vtx-form-layout/Card.js +10 -10
- package/es/vtx-form-layout/Divider.js +1 -1
- package/es/vtx-form-layout/FormItem.js +16 -16
- package/es/vtx-form-layout/Pane.js +23 -12
- package/es/vtx-icon/index.js +54 -45
- package/es/vtx-icon/index.js1 +90 -0
- package/es/vtx-image/Preview.js +11 -6
- package/es/vtx-image/style/index.js +0 -1
- package/es/vtx-import/index.js +207 -65
- 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 +30 -19
- package/es/vtx-import2/style/index.js +60 -9
- package/es/vtx-modal/index.js +9 -4
- package/es/vtx-page-layout/style/index.js +4 -2
- package/es/vtx-provider/index.js +7 -3
- package/es/vtx-provider/locale/en_US.js +57 -3
- package/es/vtx-provider/locale/zh_CN.js +57 -3
- package/es/vtx-search/index.js +13 -9
- package/es/vtx-search/style/index.js +2 -1
- package/es/vtx-select/index.js +102 -36
- package/es/vtx-select/style/index.js +11 -56
- package/es/vtx-signature/index.js +5 -4
- package/es/vtx-signature/style/index.js +1 -1
- 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-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 +98 -35
- package/es/vtx-tree-select/index.js +71 -105
- 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 +93 -39
- package/es/vtx-wang-editor/wangEditorUtil.js +4 -0
- package/lib/index.js +36 -0
- package/lib/utils/filterSpecialCharacters.js +48 -46
- package/lib/utils/index.js +0 -7
- package/lib/vtx-combogrid/Combogrid.js +5 -4
- package/lib/vtx-combogrid/index.js +7 -4
- package/lib/vtx-datagrid/Store/Provide.js +113 -143
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +7 -3
- package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
- package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
- package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
- package/lib/vtx-datagrid/columnState.js +100 -0
- package/lib/vtx-datagrid/index.js +124 -32
- package/lib/vtx-datagrid/mergeComponents.js +21 -0
- package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
- package/lib/vtx-datagrid/style/index.js +102 -20
- package/lib/vtx-date-picker/QdatePicker.js +1 -1
- 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 +7 -2
- package/lib/vtx-ellipsis-text/style/index.js +3 -1
- package/lib/vtx-export/index.js +26 -26
- package/lib/vtx-export-async/History.js +11 -3
- package/lib/vtx-export-async/index.js +43 -13
- package/lib/vtx-export-async/util.js +16 -5
- package/lib/vtx-form-layout/Card.js +9 -9
- package/lib/vtx-form-layout/Divider.js +1 -1
- package/lib/vtx-form-layout/FormItem.js +16 -16
- package/lib/vtx-form-layout/Pane.js +22 -11
- package/lib/vtx-icon/index.js +54 -52
- package/lib/vtx-icon/index.js1 +90 -0
- package/lib/vtx-image/Preview.js +11 -6
- package/lib/vtx-image/style/index.js +0 -1
- package/lib/vtx-import/index.js +205 -63
- 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 -18
- package/lib/vtx-import2/style/index.js +60 -9
- package/lib/vtx-modal/index.js +9 -4
- package/lib/vtx-page-layout/style/index.js +4 -2
- package/lib/vtx-provider/index.js +7 -3
- package/lib/vtx-provider/locale/en_US.js +57 -3
- package/lib/vtx-provider/locale/zh_CN.js +57 -3
- package/lib/vtx-search/index.js +13 -9
- package/lib/vtx-search/style/index.js +2 -1
- package/lib/vtx-select/index.js +104 -38
- package/lib/vtx-select/style/index.js +11 -56
- package/lib/vtx-signature/index.js +4 -3
- package/lib/vtx-signature/style/index.js +1 -1
- 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-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 +96 -33
- package/lib/vtx-tree-select/index.js +71 -105
- 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 +91 -37
- package/lib/vtx-wang-editor/wangEditorUtil.js +4 -0
- package/package.json +47 -32
- package/es/utils/hooks/useFetchData/index.js +0 -82
- package/lib/utils/hooks/useFetchData/index.js +0 -89
package/es/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export * from "./vtx-time-picker";
|
|
|
22
22
|
export * from "./vtx-upload";
|
|
23
23
|
export * from "./vtx-tree-select";
|
|
24
24
|
export * from "./vtx-signature";
|
|
25
|
+
export * from "./vtx-transfer-select";
|
|
25
26
|
|
|
26
27
|
// data display
|
|
27
28
|
export * from "./vtx-datagrid";
|
|
@@ -30,8 +31,10 @@ export * from "./vtx-image";
|
|
|
30
31
|
export * from "./vtx-rps-frame";
|
|
31
32
|
export * from "./vtx-statistics-column";
|
|
32
33
|
export * from "./vtx-tree";
|
|
34
|
+
export * from "./vtx-transfer";
|
|
33
35
|
export * from "./vtx-split-pane";
|
|
34
36
|
export * from "./vtx-icon";
|
|
37
|
+
export * from "./vtx-descriptions";
|
|
35
38
|
|
|
36
39
|
// feedback
|
|
37
40
|
export * from "./vtx-modal";
|
|
@@ -9,6 +9,52 @@ function isNotEmpty(value) {
|
|
|
9
9
|
return Array.isArray(value) && value.length > 0;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
// 特殊符号,- _ 排除
|
|
13
|
+
export var SpecialCharacters = [
|
|
14
|
+
// 小括号
|
|
15
|
+
'(', ')', '(', ')',
|
|
16
|
+
// 中括号
|
|
17
|
+
'\\[', '\\]', '[', ']',
|
|
18
|
+
// 大括号
|
|
19
|
+
'{', '}', '{', '}',
|
|
20
|
+
// 方头括号
|
|
21
|
+
'【', '】',
|
|
22
|
+
// 尖括号
|
|
23
|
+
'<', '>',
|
|
24
|
+
// 书名号
|
|
25
|
+
'《', '》',
|
|
26
|
+
// 斜杠
|
|
27
|
+
'/',
|
|
28
|
+
// 反斜杠
|
|
29
|
+
'\\\\',
|
|
30
|
+
// 逗号
|
|
31
|
+
',', ',',
|
|
32
|
+
// 句号
|
|
33
|
+
'.', '。',
|
|
34
|
+
// 冒号
|
|
35
|
+
':', ':',
|
|
36
|
+
// 分号
|
|
37
|
+
';', ';',
|
|
38
|
+
// 顿号
|
|
39
|
+
'、',
|
|
40
|
+
// 破折号
|
|
41
|
+
'——',
|
|
42
|
+
// 感叹号
|
|
43
|
+
'!', '!',
|
|
44
|
+
// 问号
|
|
45
|
+
'?', '?',
|
|
46
|
+
// 加减等于
|
|
47
|
+
'+', '=',
|
|
48
|
+
// 单引号
|
|
49
|
+
"'", '‘', '’',
|
|
50
|
+
// 双引号
|
|
51
|
+
'"', '“', '”',
|
|
52
|
+
// 金钱
|
|
53
|
+
'$', '¥',
|
|
54
|
+
// 百分号
|
|
55
|
+
'%', '%',
|
|
56
|
+
// 其它
|
|
57
|
+
'@', '#', '`', '~', '*', '^', '……', '|', '&'];
|
|
12
58
|
/**
|
|
13
59
|
* 过滤特殊字符
|
|
14
60
|
* @param {String} value 值
|
|
@@ -22,52 +68,7 @@ export default function filterSpecialCharacters(value) {
|
|
|
22
68
|
include = _ref$include === void 0 ? [] : _ref$include,
|
|
23
69
|
_ref$exclude = _ref.exclude,
|
|
24
70
|
exclude = _ref$exclude === void 0 ? [] : _ref$exclude;
|
|
25
|
-
|
|
26
|
-
var specialCharacter = [
|
|
27
|
-
// 小括号
|
|
28
|
-
'(', ')', '(', ')',
|
|
29
|
-
// 中括号
|
|
30
|
-
'\\[', '\\]', '[', ']',
|
|
31
|
-
// 大括号
|
|
32
|
-
'{', '}', '{', '}',
|
|
33
|
-
// 方头括号
|
|
34
|
-
'【', '】',
|
|
35
|
-
// 尖括号
|
|
36
|
-
'<', '>',
|
|
37
|
-
// 书名号
|
|
38
|
-
'《', '》',
|
|
39
|
-
// 斜杠
|
|
40
|
-
'/',
|
|
41
|
-
// 反斜杠
|
|
42
|
-
'\\\\',
|
|
43
|
-
// 逗号
|
|
44
|
-
',', ',',
|
|
45
|
-
// 句号
|
|
46
|
-
'.', '。',
|
|
47
|
-
// 冒号
|
|
48
|
-
':', ':',
|
|
49
|
-
// 分号
|
|
50
|
-
';', ';',
|
|
51
|
-
// 顿号
|
|
52
|
-
'、',
|
|
53
|
-
// 破折号
|
|
54
|
-
'——',
|
|
55
|
-
// 感叹号
|
|
56
|
-
'!', '!',
|
|
57
|
-
// 问号
|
|
58
|
-
'?', '?',
|
|
59
|
-
// 加减等于
|
|
60
|
-
'+', '=',
|
|
61
|
-
// 单引号
|
|
62
|
-
"'", '‘', '’',
|
|
63
|
-
// 双引号
|
|
64
|
-
'"', '“', '”',
|
|
65
|
-
// 金钱
|
|
66
|
-
'$', '¥',
|
|
67
|
-
// 百分号
|
|
68
|
-
'%', '%',
|
|
69
|
-
// 其它
|
|
70
|
-
'@', '#', '`', '~', '*', '^', '……', '|', '&'];
|
|
71
|
+
var specialCharacter = JSON.parse(JSON.stringify(SpecialCharacters));
|
|
71
72
|
|
|
72
73
|
// 新增
|
|
73
74
|
if (isNotEmpty(include)) {
|
package/es/utils/index.js
CHANGED
|
@@ -15,7 +15,6 @@ import { useDebounceValue } from "./hooks/useDebounceValue";
|
|
|
15
15
|
import { useDeepCompareEffect, useDeepCompareEffectDebounce } from "./hooks/useDeepCompareEffect";
|
|
16
16
|
import useDeepCompareMemo from "./hooks/useDeepCompareMemo";
|
|
17
17
|
import { useDocumentTitle } from "./hooks/useDocumentTitle";
|
|
18
|
-
import { useFetchData } from "./hooks/useFetchData";
|
|
19
18
|
import { useLatest } from "./hooks/useLatest";
|
|
20
19
|
import { usePrevious } from "./hooks/usePrevious";
|
|
21
20
|
import { useReactiveRef } from "./hooks/useReactiveRef";
|
|
@@ -56,7 +55,7 @@ export { conversionMomentValue, conversionMomentValue as conversionSubmitValue,
|
|
|
56
55
|
// function
|
|
57
56
|
transformKeySubmitValue, useBreakpoint, useDebounceFn, useDebounceValue, useDeepCompareEffect, useDeepCompareEffectDebounce, useDeepCompareMemo, useDocumentTitle,
|
|
58
57
|
// hooks
|
|
59
|
-
useEditableArray, useEditableMap,
|
|
58
|
+
useEditableArray, useEditableMap, useLatest, useMountMergeState, usePrevious, useReactiveRef, useRefCallback, useRefFunction, useStyle, genColumnKey, getPlaceholder };
|
|
60
59
|
|
|
61
60
|
// 注意:以下类型导出在JavaScript中不可用,已移除
|
|
62
61
|
// export type {
|
|
@@ -43,7 +43,8 @@ function VtxCombogrid(props, ref) {
|
|
|
43
43
|
searchForms = _props$searchForms === void 0 ? [] : _props$searchForms,
|
|
44
44
|
selectedRowKeys = props.selectedRowKeys,
|
|
45
45
|
setSelectedRowKeys = props.setSelectedRowKeys,
|
|
46
|
-
spread = props.spread,
|
|
46
|
+
_props$spread = props.spread,
|
|
47
|
+
spread = _props$spread === void 0 ? false : _props$spread,
|
|
47
48
|
defaultPageSize = props.defaultPageSize,
|
|
48
49
|
_props$customEnumText = props.customEnumText,
|
|
49
50
|
customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText,
|
|
@@ -130,16 +131,16 @@ function VtxCombogrid(props, ref) {
|
|
|
130
131
|
});
|
|
131
132
|
}
|
|
132
133
|
|
|
133
|
-
//
|
|
134
|
+
// 重置会清空 selectedRowKeys,因此也需清空文本中的 value 值
|
|
134
135
|
var query = function query() {
|
|
135
136
|
submit();
|
|
136
|
-
if (multiple && selectedRowKeys.length) {
|
|
137
|
+
if (!spread && multiple && selectedRowKeys.length) {
|
|
137
138
|
clearSelectedRow();
|
|
138
139
|
}
|
|
139
140
|
};
|
|
140
141
|
var clear = function clear() {
|
|
141
142
|
reset();
|
|
142
|
-
if (multiple && selectedRowKeys.length) {
|
|
143
|
+
if (!spread && multiple && selectedRowKeys.length) {
|
|
143
144
|
clearSelectedRow();
|
|
144
145
|
}
|
|
145
146
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
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 = ["className", "style", "placeholder", "prefixCls", "value", "allowClear", "selectedRowKeys", "popoverProps", "inputProps", "content", "disabled"];
|
|
2
|
+
var _excluded = ["className", "style", "placeholder", "prefixCls", "value", "allowClear", "selectedRowKeys", "popoverProps", "inputProps", "content", "disabled", "spread"];
|
|
3
3
|
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
4
|
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
5
|
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; }
|
|
@@ -48,6 +48,8 @@ var VtxCombogrid = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
48
48
|
content = _props$content === void 0 ? null : _props$content,
|
|
49
49
|
_props$disabled = props.disabled,
|
|
50
50
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
51
|
+
_props$spread = props.spread,
|
|
52
|
+
spread = _props$spread === void 0 ? false : _props$spread,
|
|
51
53
|
rest = _objectWithoutProperties(props, _excluded);
|
|
52
54
|
useEffect(function () {
|
|
53
55
|
setSelectedRowKeys(defaultSelectedRowKeys);
|
|
@@ -71,11 +73,12 @@ var VtxCombogrid = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
71
73
|
defaultSelectedRowKeys: defaultSelectedRowKeys,
|
|
72
74
|
setSelectedRowKeys: setSelectedRowKeys,
|
|
73
75
|
setPopoverVisible: setVisible,
|
|
76
|
+
spread: spread,
|
|
74
77
|
ref: comboRef
|
|
75
78
|
})),
|
|
76
79
|
trigger: "click",
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
open: disabled ? false : visible,
|
|
81
|
+
onOpenChange: function onOpenChange(visible) {
|
|
79
82
|
return setVisible(visible);
|
|
80
83
|
},
|
|
81
84
|
classNames: {
|
|
@@ -109,7 +112,7 @@ export { VtxCombogrid };
|
|
|
109
112
|
VtxCombogrid.propTypes = {
|
|
110
113
|
prefixCls: PropTypes.string,
|
|
111
114
|
placeholder: PropTypes.string,
|
|
112
|
-
value: PropTypes.string,
|
|
115
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
|
|
113
116
|
allowClear: PropTypes.bool,
|
|
114
117
|
disabled: PropTypes.bool,
|
|
115
118
|
className: PropTypes.string,
|
|
@@ -3,35 +3,83 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableTo
|
|
|
3
3
|
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."); }
|
|
4
4
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
5
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
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; }
|
|
7
|
+
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; }
|
|
8
|
+
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; }
|
|
9
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
10
|
+
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); }
|
|
6
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
7
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
13
|
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); }
|
|
9
14
|
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; }
|
|
10
15
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
11
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
-
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; }
|
|
13
|
-
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; }
|
|
14
|
-
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; }
|
|
15
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
16
|
-
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); }
|
|
17
17
|
import { useMergedState } from '@rc-component/util';
|
|
18
|
-
import
|
|
18
|
+
import request from '@vtx/utils/lib/request';
|
|
19
19
|
import getSignature from '@vtx/utils/lib/getSignature';
|
|
20
|
-
import
|
|
20
|
+
import VtxEllipsisText from "../../vtx-ellipsis-text";
|
|
21
|
+
import { createContext, useEffect, useMemo, useRef, useState, useCallback } from 'react';
|
|
21
22
|
import { useIntl } from "../../vtx-provider";
|
|
22
23
|
import { message } from 'antd';
|
|
23
|
-
import { genColumnKey, isFunction,
|
|
24
|
+
import { genColumnKey, isFunction, useDeepCompareEffectDebounce } from "../../utils";
|
|
24
25
|
import renderColumnButtons from "../renderColumnButtons";
|
|
25
26
|
import { getVtxToken } from '@vtx/utils';
|
|
27
|
+
import { buildColumnKeyMap, buildSortKeyColumns, getVisibleColumnKeysFromMap } from "../columnState";
|
|
26
28
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
29
|
export var indexColumnKey = '_serialNum';
|
|
30
|
+
function useMergedState1(defaultValue, option) {
|
|
31
|
+
var _ref = option || {},
|
|
32
|
+
controlledValue = _ref.value,
|
|
33
|
+
onChange = _ref.onChange,
|
|
34
|
+
id = _ref.id;
|
|
35
|
+
|
|
36
|
+
// 1. 初始化内部非受控状态
|
|
37
|
+
var _useState = useState(defaultValue),
|
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
+
innerValue = _useState2[0],
|
|
40
|
+
setInnerValue = _useState2[1];
|
|
41
|
+
// 记录上一次的值,用于 onChange 回调传参
|
|
42
|
+
var prevValueRef = useRef(controlledValue !== null && controlledValue !== void 0 ? controlledValue : innerValue);
|
|
43
|
+
// 2. 受控模式下,同步更新 prevValueRef
|
|
44
|
+
useEffect(function () {
|
|
45
|
+
if (controlledValue !== undefined) {
|
|
46
|
+
prevValueRef.current = controlledValue;
|
|
47
|
+
}
|
|
48
|
+
}, [controlledValue]);
|
|
49
|
+
// 3. 统一的取值逻辑:优先用受控值,否则用内部值
|
|
50
|
+
var mergedValue = controlledValue !== undefined ? controlledValue : innerValue;
|
|
51
|
+
// 4. 统一的更新方法
|
|
52
|
+
var setValue = useCallback(function (value) {
|
|
53
|
+
var prevValue = mergedValue;
|
|
54
|
+
// 处理函数式更新(和 useState 保持一致)
|
|
55
|
+
var nextValue = typeof value === 'function' ? value(prevValue) : value;
|
|
56
|
+
|
|
57
|
+
// 受控模式:调用 onChange,不更新内部 state
|
|
58
|
+
if (controlledValue !== undefined) {
|
|
59
|
+
onChange === null || onChange === void 0 || onChange(nextValue, prevValue);
|
|
60
|
+
}
|
|
61
|
+
// 非受控模式:更新内部 state,同时触发 onChange
|
|
62
|
+
else {
|
|
63
|
+
setInnerValue(nextValue);
|
|
64
|
+
onChange === null || onChange === void 0 || onChange(nextValue, prevValue);
|
|
65
|
+
}
|
|
66
|
+
// 更新上一次值的缓存
|
|
67
|
+
prevValueRef.current = nextValue;
|
|
68
|
+
}, [controlledValue, mergedValue, onChange]);
|
|
69
|
+
// 5. 重置方法:恢复到初始默认值
|
|
70
|
+
var reset = useCallback(function () {
|
|
71
|
+
var resetValue = typeof defaultValue === 'function' ? defaultValue() : defaultValue;
|
|
72
|
+
setValue(resetValue);
|
|
73
|
+
}, [defaultValue, setValue]);
|
|
74
|
+
return [mergedValue, setValue, reset];
|
|
75
|
+
}
|
|
28
76
|
function useContainer() {
|
|
29
77
|
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
30
|
-
var
|
|
31
|
-
|
|
32
|
-
userId =
|
|
33
|
-
|
|
34
|
-
tenantId =
|
|
78
|
+
var _ref2 = getVtxToken() || {},
|
|
79
|
+
_ref2$userId = _ref2.userId,
|
|
80
|
+
userId = _ref2$userId === void 0 ? '' : _ref2$userId,
|
|
81
|
+
_ref2$tenantId = _ref2.tenantId,
|
|
82
|
+
tenantId = _ref2$tenantId === void 0 ? '' : _ref2$tenantId;
|
|
35
83
|
var intl = useIntl();
|
|
36
84
|
var _props$indexColumn = props.indexColumn,
|
|
37
85
|
indexColumn = _props$indexColumn === void 0 ? true : _props$indexColumn,
|
|
@@ -87,22 +135,22 @@ function useContainer() {
|
|
|
87
135
|
var columnsMapRef = useRef({});
|
|
88
136
|
// 是否可拖拽, 除非columns 至少需要一项不设置 width 让其自适应。
|
|
89
137
|
var isDragRef = useRef(false);
|
|
90
|
-
var
|
|
91
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
92
|
-
columnsMap = _useState2[0],
|
|
93
|
-
setColumnsMap = _useState2[1];
|
|
94
|
-
var _useState3 = useState(false),
|
|
138
|
+
var _useState3 = useState({}),
|
|
95
139
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
var _useState5 = useState(
|
|
140
|
+
columnsMap = _useState4[0],
|
|
141
|
+
setColumnsMap = _useState4[1];
|
|
142
|
+
var _useState5 = useState(false),
|
|
99
143
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
var _useState7 = useState(
|
|
144
|
+
showTable = _useState6[0],
|
|
145
|
+
setShowTable = _useState6[1];
|
|
146
|
+
var _useState7 = useState(''),
|
|
103
147
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
104
|
-
|
|
105
|
-
|
|
148
|
+
keyWords = _useState8[0],
|
|
149
|
+
_setKeyWords = _useState8[1];
|
|
150
|
+
var _useState9 = useState({}),
|
|
151
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
152
|
+
tableConfig = _useState10[0],
|
|
153
|
+
setTableConfig = _useState10[1];
|
|
106
154
|
var _useMergedState = useMergedState(function () {
|
|
107
155
|
return props.size || props.defaultSize || 'middle';
|
|
108
156
|
}, {
|
|
@@ -113,7 +161,7 @@ function useContainer() {
|
|
|
113
161
|
tableSize = _useMergedState2[0],
|
|
114
162
|
setTableSize = _useMergedState2[1];
|
|
115
163
|
var _useMergedState3 = useMergedState(function () {
|
|
116
|
-
return props.tableStyles || ['striped', 'header-background', 'border'];
|
|
164
|
+
return props.tableStyles || props.defaultTableStyles || ['striped', 'header-background', 'border'];
|
|
117
165
|
}, {
|
|
118
166
|
value: props.tableStyles,
|
|
119
167
|
onChange: props.onChangeTableStyles
|
|
@@ -122,7 +170,7 @@ function useContainer() {
|
|
|
122
170
|
tableStyles = _useMergedState4[0],
|
|
123
171
|
setTableStyles = _useMergedState4[1];
|
|
124
172
|
var _useMergedState5 = useMergedState(function () {
|
|
125
|
-
return props.visibleColumnKeys || undefined;
|
|
173
|
+
return props.visibleColumnKeys || props.defaultVisibleColumnKeys || undefined;
|
|
126
174
|
}, {
|
|
127
175
|
value: props.visibleColumnKeys,
|
|
128
176
|
onChange: props.onVisibleColumnsChange
|
|
@@ -131,7 +179,7 @@ function useContainer() {
|
|
|
131
179
|
visibleColumnKeys = _useMergedState6[0],
|
|
132
180
|
setVisibleColumnKeys = _useMergedState6[1];
|
|
133
181
|
var _useMergedState7 = useMergedState(function () {
|
|
134
|
-
return props.uniqueKey || undefined;
|
|
182
|
+
return props.uniqueKey || props.defaultUniqueKey || undefined;
|
|
135
183
|
}, {
|
|
136
184
|
value: props.uniqueKey,
|
|
137
185
|
onChange: props.onChangesUniqueKey
|
|
@@ -170,16 +218,24 @@ function useContainer() {
|
|
|
170
218
|
key: newColumn.key || newColumn.dataIndex,
|
|
171
219
|
disable: disabledColumnKeys === null || disabledColumnKeys === void 0 ? void 0 : disabledColumnKeys.includes(column.dataIndex || column.key),
|
|
172
220
|
render: isFunction(column.renderButtons) ? function (text, record, index) {
|
|
173
|
-
return
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
221
|
+
return /*#__PURE__*/_jsx("div", {
|
|
222
|
+
style: {
|
|
223
|
+
whiteSpace: 'nowrap'
|
|
224
|
+
},
|
|
225
|
+
children: renderColumnButtons({
|
|
226
|
+
renderButtons: column.renderButtons,
|
|
227
|
+
visible: column.renderButtonsVisibleNum,
|
|
228
|
+
text: text,
|
|
229
|
+
record: record,
|
|
230
|
+
index: index,
|
|
231
|
+
TextEnum: TextEnum
|
|
232
|
+
})
|
|
180
233
|
});
|
|
181
234
|
} : 'render' in column ? column.render : function (text) {
|
|
182
|
-
return ['', null, undefined].includes(text) ? '-' : text
|
|
235
|
+
return ['', null, undefined].includes(text) ? '-' : column.ellipse && typeof text === 'string' ? /*#__PURE__*/_jsx(VtxEllipsisText, {
|
|
236
|
+
text: text,
|
|
237
|
+
lineClamp: 2
|
|
238
|
+
}) : text;
|
|
183
239
|
}
|
|
184
240
|
});
|
|
185
241
|
});
|
|
@@ -188,121 +244,34 @@ function useContainer() {
|
|
|
188
244
|
|
|
189
245
|
// 默认值 可以从接口里获取
|
|
190
246
|
var defaultColumnKeyMap = useMemo(function () {
|
|
191
|
-
var columnKeyMap = {};
|
|
192
247
|
if (tableConfig.columnsMap && tableConfig.sortKeyColumns) {
|
|
193
248
|
setColumnsMap(tableConfig.columnsMap);
|
|
194
249
|
sortKeyColumns.current = tableConfig.sortKeyColumns;
|
|
195
250
|
return tableConfig.columnsMap;
|
|
196
|
-
} else if (Array.isArray(props.defaultVisibleColumnKeys)) {
|
|
197
|
-
tableColumn === null || tableColumn === void 0 || tableColumn.forEach(function (_ref2, index) {
|
|
198
|
-
var _ref3;
|
|
199
|
-
var key = _ref2.key,
|
|
200
|
-
dataIndex = _ref2.dataIndex,
|
|
201
|
-
fixed = _ref2.fixed,
|
|
202
|
-
disable = _ref2.disable,
|
|
203
|
-
width = _ref2.width;
|
|
204
|
-
var columnKey = genColumnKey(key !== null && key !== void 0 ? key : dataIndex, index);
|
|
205
|
-
columnKeyMap[columnKey] = {
|
|
206
|
-
show: indexColumn && indexColumnKey == columnKey ? true : (_ref3 = _toConsumableArray(props.defaultVisibleColumnKeys)) === null || _ref3 === void 0 ? void 0 : _ref3.includes(columnKey),
|
|
207
|
-
fixed: fixed,
|
|
208
|
-
disable: disable,
|
|
209
|
-
width: width
|
|
210
|
-
};
|
|
211
|
-
});
|
|
212
|
-
} else {
|
|
213
|
-
tableColumn === null || tableColumn === void 0 || tableColumn.forEach(function (_ref4, index) {
|
|
214
|
-
var key = _ref4.key,
|
|
215
|
-
dataIndex = _ref4.dataIndex,
|
|
216
|
-
fixed = _ref4.fixed,
|
|
217
|
-
disable = _ref4.disable,
|
|
218
|
-
width = _ref4.width;
|
|
219
|
-
var columnKey = genColumnKey(key !== null && key !== void 0 ? key : dataIndex, index);
|
|
220
|
-
columnKeyMap[columnKey] = {
|
|
221
|
-
show: true,
|
|
222
|
-
fixed: fixed,
|
|
223
|
-
disable: disable,
|
|
224
|
-
width: width
|
|
225
|
-
};
|
|
226
|
-
});
|
|
227
251
|
}
|
|
228
|
-
return
|
|
252
|
+
return buildColumnKeyMap(tableColumn, {
|
|
253
|
+
defaultVisibleColumnKeys: props.defaultVisibleColumnKeys,
|
|
254
|
+
indexColumn: indexColumn
|
|
255
|
+
});
|
|
229
256
|
}, [tableColumn, props.defaultVisibleColumnKeys, tableConfig, uniqueKey]);
|
|
230
257
|
|
|
231
258
|
// 深度比较 + 防抖 + 忽略这render函数引用变化
|
|
232
259
|
useDeepCompareEffectDebounce(function () {
|
|
233
|
-
var columnKeyMap = {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
dataIndex = _ref5.dataIndex,
|
|
239
|
-
fixed = _ref5.fixed,
|
|
240
|
-
disable = _ref5.disable,
|
|
241
|
-
width = _ref5.width;
|
|
242
|
-
var columnKey = genColumnKey(key !== null && key !== void 0 ? key : dataIndex, index);
|
|
243
|
-
columnKeyMap[columnKey] = {
|
|
244
|
-
show: isFirst.current && indexColumn && indexColumnKey == columnKey ? true : (_ref6 = _toConsumableArray(visibleColumnKeys)) === null || _ref6 === void 0 ? void 0 : _ref6.includes(columnKey),
|
|
245
|
-
fixed: fixed,
|
|
246
|
-
disable: disable,
|
|
247
|
-
width: width
|
|
248
|
-
};
|
|
249
|
-
});
|
|
250
|
-
} else if (Array.isArray(props.defaultVisibleColumnKeys)) {
|
|
251
|
-
tableColumn === null || tableColumn === void 0 || tableColumn.forEach(function (_ref7, index) {
|
|
252
|
-
var _ref8;
|
|
253
|
-
var key = _ref7.key,
|
|
254
|
-
dataIndex = _ref7.dataIndex,
|
|
255
|
-
fixed = _ref7.fixed,
|
|
256
|
-
disable = _ref7.disable,
|
|
257
|
-
width = _ref7.width;
|
|
258
|
-
var columnKey = genColumnKey(key !== null && key !== void 0 ? key : dataIndex, index);
|
|
259
|
-
columnKeyMap[columnKey] = {
|
|
260
|
-
show: isFirst.current && indexColumn && indexColumnKey == columnKey ? true : (_ref8 = _toConsumableArray(props.defaultVisibleColumnKeys)) === null || _ref8 === void 0 ? void 0 : _ref8.includes(columnKey),
|
|
261
|
-
fixed: fixed,
|
|
262
|
-
disable: disable,
|
|
263
|
-
width: width
|
|
264
|
-
};
|
|
265
|
-
});
|
|
266
|
-
} else {
|
|
267
|
-
tableColumn === null || tableColumn === void 0 || tableColumn.forEach(function (_ref9, index) {
|
|
268
|
-
var key = _ref9.key,
|
|
269
|
-
dataIndex = _ref9.dataIndex,
|
|
270
|
-
fixed = _ref9.fixed,
|
|
271
|
-
disable = _ref9.disable,
|
|
272
|
-
width = _ref9.width;
|
|
273
|
-
var columnKey = genColumnKey(key !== null && key !== void 0 ? key : dataIndex, index);
|
|
274
|
-
columnKeyMap[columnKey] = {
|
|
275
|
-
show: true,
|
|
276
|
-
fixed: fixed,
|
|
277
|
-
disable: disable,
|
|
278
|
-
width: width
|
|
279
|
-
};
|
|
280
|
-
});
|
|
281
|
-
}
|
|
282
|
-
var sortKeys = visibleColumnKeys || props.defaultVisibleColumnKeys || [];
|
|
283
|
-
sortKeyColumns.current = Object.entries(columnKeyMap).map(function (_ref10) {
|
|
284
|
-
var _ref11 = _slicedToArray(_ref10, 1),
|
|
285
|
-
key = _ref11[0];
|
|
286
|
-
return key;
|
|
260
|
+
var columnKeyMap = buildColumnKeyMap(tableColumn, {
|
|
261
|
+
visibleColumnKeys: visibleColumnKeys,
|
|
262
|
+
defaultVisibleColumnKeys: props.defaultVisibleColumnKeys,
|
|
263
|
+
previousColumnsMap: columnsMapRef.current,
|
|
264
|
+
indexColumn: indexColumn
|
|
287
265
|
});
|
|
288
|
-
|
|
289
|
-
sortKeyColumns.current = sortByGivenOrder(sortKeyColumns.current, sortKeys);
|
|
290
|
-
}
|
|
266
|
+
sortKeyColumns.current = buildSortKeyColumns(columnKeyMap, visibleColumnKeys, props.defaultVisibleColumnKeys);
|
|
291
267
|
setColumnsMap(columnKeyMap);
|
|
292
268
|
if (isFirst.current) {
|
|
293
269
|
isFirst.current = false;
|
|
294
270
|
}
|
|
295
|
-
}, [visibleColumnKeys], ['render'], 100);
|
|
271
|
+
}, [visibleColumnKeys, props.defaultVisibleColumnKeys, tableColumn], ['render'], 100);
|
|
296
272
|
useDeepCompareEffectDebounce(function () {
|
|
297
|
-
var
|
|
298
|
-
|
|
299
|
-
(_sortKeyColumns$curre = sortKeyColumns.current) === null || _sortKeyColumns$curre === void 0 || _sortKeyColumns$curre.map(function (columnKey) {
|
|
300
|
-
var config = columnsMap[columnKey];
|
|
301
|
-
if (config !== null && config !== void 0 && config.show) {
|
|
302
|
-
visibleColumnKeys.push(columnKey);
|
|
303
|
-
}
|
|
304
|
-
});
|
|
305
|
-
(_props$onVisibleColum = props.onVisibleColumnsChange) === null || _props$onVisibleColum === void 0 || _props$onVisibleColum.call(props, visibleColumnKeys);
|
|
273
|
+
var _props$onVisibleColum;
|
|
274
|
+
(_props$onVisibleColum = props.onVisibleColumnsChange) === null || _props$onVisibleColum === void 0 || _props$onVisibleColum.call(props, getVisibleColumnKeysFromMap(columnsMap, sortKeyColumns.current));
|
|
306
275
|
}, [JSON.stringify(columnsMap), sortKeyColumns.current], ['render'], 200);
|
|
307
276
|
var show = function show() {
|
|
308
277
|
setTimeout(function () {
|
|
@@ -29,6 +29,7 @@ import { VtxProvider } from "../../../../vtx-provider";
|
|
|
29
29
|
import { TableContext } from "../../../Store/Provide";
|
|
30
30
|
import VtxIcon from "../../../../vtx-icon";
|
|
31
31
|
import { useStyle } from "./style";
|
|
32
|
+
import { getVisibleColumnKeysFromMap } from "../../../columnState";
|
|
32
33
|
// omit 用于从对象中排除指定的属性,返回一个新对象
|
|
33
34
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
34
35
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -244,7 +245,6 @@ var CheckboxList = function CheckboxList(_ref3) {
|
|
|
244
245
|
var dropPosition = info.dropPosition,
|
|
245
246
|
dropToGap = info.dropToGap;
|
|
246
247
|
var position = dropPosition === -1 || !dropToGap ? dropPosition + 1 : dropPosition;
|
|
247
|
-
console.log('newMap info', dragKey, dropKey, position);
|
|
248
248
|
move(dragKey, dropKey, position);
|
|
249
249
|
},
|
|
250
250
|
treeIcon: false,
|
|
@@ -367,6 +367,7 @@ export default function ColumnSetting(props) {
|
|
|
367
367
|
setColumnsMap = _useContext8.setColumnsMap,
|
|
368
368
|
defaultColumnKeyMap = _useContext8.defaultColumnKeyMap,
|
|
369
369
|
setSortKeyColumns = _useContext8.setSortKeyColumns,
|
|
370
|
+
sortKeyColumns = _useContext8.sortKeyColumns,
|
|
370
371
|
saveColumns = _useContext8.saveColumns,
|
|
371
372
|
TextEnum = _useContext8.TextEnum,
|
|
372
373
|
tableColumn = _useContext8.tableColumn;
|
|
@@ -430,7 +431,7 @@ export default function ColumnSetting(props) {
|
|
|
430
431
|
|
|
431
432
|
// 保存按钮
|
|
432
433
|
var onSaveChange = function onSaveChange() {
|
|
433
|
-
onColumnsSave(checkedColumnKeys);
|
|
434
|
+
onColumnsSave(Array.isArray(checkedColumnKeys) ? checkedColumnKeys : getVisibleColumnKeysFromMap(columnsMap, sortKeyColumns));
|
|
434
435
|
};
|
|
435
436
|
// 未选中的 key 列表
|
|
436
437
|
var unCheckedKeys = Object.values(columnsMap).filter(function (value) {
|
|
@@ -501,7 +502,10 @@ export default function ColumnSetting(props) {
|
|
|
501
502
|
children: TextEnum.columnSettingSaveText
|
|
502
503
|
})]
|
|
503
504
|
}) : null]
|
|
504
|
-
})
|
|
505
|
+
}),
|
|
506
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
507
|
+
return triggerNode.parentNode;
|
|
508
|
+
}
|
|
505
509
|
// open={true}
|
|
506
510
|
,
|
|
507
511
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
@@ -21,7 +21,8 @@ var genVtxStyle = function genVtxStyle(token) {
|
|
|
21
21
|
padding: 0,
|
|
22
22
|
marginBottom: 10
|
|
23
23
|
}), '.ant-popover-content', _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
24
|
-
padding: '0 16px 16px 16px'
|
|
24
|
+
padding: '0 16px 16px 16px',
|
|
25
|
+
width: 196
|
|
25
26
|
}, "".concat(token.antCls, "-tree-node-content-wrapper:hover"), {
|
|
26
27
|
backgroundColor: 'transparent'
|
|
27
28
|
}), ".ant-tree-switcher", {
|
|
@@ -29,7 +30,9 @@ var genVtxStyle = function genVtxStyle(token) {
|
|
|
29
30
|
}), "".concat(token.antCls, "-tree-draggable-icon"), {
|
|
30
31
|
cursor: 'grab'
|
|
31
32
|
}), "".concat(token.antCls, "-tree-treenode"), _defineProperty(_defineProperty({
|
|
32
|
-
alignItems: 'center'
|
|
33
|
+
alignItems: 'center',
|
|
34
|
+
paddingRight: 12,
|
|
35
|
+
boxSizing: 'border-box'
|
|
33
36
|
}, "".concat(token.antCls, "-tree-checkbox"), {
|
|
34
37
|
marginInlineEnd: 4
|
|
35
38
|
}), "".concat(token.antCls, "-tree-title"), {
|
|
@@ -28,6 +28,9 @@ function Density() {
|
|
|
28
28
|
selectedKeys: [counter.tableSize]
|
|
29
29
|
},
|
|
30
30
|
trigger: ['click'],
|
|
31
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
32
|
+
return triggerNode.parentNode;
|
|
33
|
+
},
|
|
31
34
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
|
32
35
|
title: TextEnum.columnDensityText,
|
|
33
36
|
children: /*#__PURE__*/_jsx("span", {
|
|
@@ -31,6 +31,9 @@ function TableStyle() {
|
|
|
31
31
|
trigger: ['click'],
|
|
32
32
|
placement: "bottomRight",
|
|
33
33
|
title: null,
|
|
34
|
+
getPopupContainer: function getPopupContainer(triggerNode) {
|
|
35
|
+
return triggerNode.parentNode;
|
|
36
|
+
},
|
|
34
37
|
content: list === null || list === void 0 ? void 0 : list.map(function (v) {
|
|
35
38
|
return /*#__PURE__*/_jsx("div", {
|
|
36
39
|
children: /*#__PURE__*/_jsx(Checkbox, {
|