@vtx/components 4.0.0-beta.9 → 4.0.0-beta.90
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-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-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
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.isBrowser = void 0;
|
|
7
7
|
var isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
|
|
8
8
|
|
|
9
|
-
/**
|
|
10
|
-
* 用于判断当前是否在浏览器环境中。
|
|
11
|
-
* 首先会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
|
|
12
|
-
* 如果是,则返回 true。否则,会进一步判断是否存在 window 对象、document 对象以及 matchMedia 方法
|
|
13
|
-
* 同时通过 !isNode 判断当前不是在服务器(Node.js)环境下执行,
|
|
14
|
-
* 如果都符合,则返回 true 表示当前处于浏览器环境中。
|
|
15
|
-
* @returns boolean
|
|
9
|
+
/**
|
|
10
|
+
* 用于判断当前是否在浏览器环境中。
|
|
11
|
+
* 首先会判断当前是否处于测试环境中(通过 process.env.NODE_ENV === 'TEST' 判断),
|
|
12
|
+
* 如果是,则返回 true。否则,会进一步判断是否存在 window 对象、document 对象以及 matchMedia 方法
|
|
13
|
+
* 同时通过 !isNode 判断当前不是在服务器(Node.js)环境下执行,
|
|
14
|
+
* 如果都符合,则返回 true 表示当前处于浏览器环境中。
|
|
15
|
+
* @returns boolean
|
|
16
16
|
*/
|
|
17
17
|
var isBrowser = exports.isBrowser = function isBrowser() {
|
|
18
18
|
if (typeof process !== 'undefined' && process.env.NODE_ENV === 'TEST') {
|
package/lib/utils/isUrl/index.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.isUrl = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* 判断是不是一个 url
|
|
9
|
-
* @param {string|undefined} path
|
|
10
|
-
* @returns boolean
|
|
7
|
+
/**
|
|
8
|
+
* 判断是不是一个 url
|
|
9
|
+
* @param {string|undefined} path
|
|
10
|
+
* @returns boolean
|
|
11
11
|
*/
|
|
12
12
|
var isUrl = exports.isUrl = function isUrl(path) {
|
|
13
13
|
if (!path) return false;
|
package/lib/utils/merge/index.js
CHANGED
|
@@ -12,10 +12,10 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
12
12
|
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); }
|
|
13
13
|
/* eslint-disable prefer-rest-params */
|
|
14
14
|
|
|
15
|
-
/**
|
|
16
|
-
* 用于合并 n 个对象
|
|
17
|
-
* @param {any[]} ...rest
|
|
18
|
-
* @returns T
|
|
15
|
+
/**
|
|
16
|
+
* 用于合并 n 个对象
|
|
17
|
+
* @param {any[]} ...rest
|
|
18
|
+
* @returns T
|
|
19
19
|
*/
|
|
20
20
|
var merge = exports.merge = function merge() {
|
|
21
21
|
var obj = {};
|
|
@@ -21,10 +21,10 @@ var genNanoid = function genNanoid() {
|
|
|
21
21
|
return e;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* 生成uuid,如果不支持 randomUUID,就用 genNanoid
|
|
26
|
-
*
|
|
27
|
-
* @returns string
|
|
24
|
+
/**
|
|
25
|
+
* 生成uuid,如果不支持 randomUUID,就用 genNanoid
|
|
26
|
+
*
|
|
27
|
+
* @returns string
|
|
28
28
|
*/
|
|
29
29
|
var nanoid = exports.nanoid = function nanoid() {
|
|
30
30
|
if (typeof window === 'undefined') return genNanoid();
|
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.omitBoolean = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* 剔除 boolean 值
|
|
9
|
-
* @param {boolean|T} obj
|
|
10
|
-
* @returns T
|
|
7
|
+
/**
|
|
8
|
+
* 剔除 boolean 值
|
|
9
|
+
* @param {boolean|T} obj
|
|
10
|
+
* @returns T
|
|
11
11
|
*/
|
|
12
12
|
var omitBoolean = exports.omitBoolean = function omitBoolean(obj) {
|
|
13
13
|
if (obj && obj !== true) {
|
|
@@ -10,10 +10,10 @@ var _isNil = require("../isNil");
|
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
11
|
_dayjs.default.extend(_customParseFormat.default);
|
|
12
12
|
|
|
13
|
-
/**
|
|
14
|
-
* 一个比较hack的moment判断工具
|
|
15
|
-
* @param value
|
|
16
|
-
* @returns
|
|
13
|
+
/**
|
|
14
|
+
* 一个比较hack的moment判断工具
|
|
15
|
+
* @param value
|
|
16
|
+
* @returns
|
|
17
17
|
*/
|
|
18
18
|
var isMoment = function isMoment(value) {
|
|
19
19
|
return !!(value !== null && value !== void 0 && value._isAMomentObject);
|
|
@@ -8,10 +8,10 @@ var _antd = require("antd");
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
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); } /**
|
|
12
|
-
* 获取类型的 type
|
|
13
|
-
*
|
|
14
|
-
* @param obj
|
|
11
|
+
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); } /**
|
|
12
|
+
* 获取类型的 type
|
|
13
|
+
*
|
|
14
|
+
* @param obj
|
|
15
15
|
*/
|
|
16
16
|
function getType(obj) {
|
|
17
17
|
// @ts-ignore
|
|
@@ -108,12 +108,12 @@ var TableStatus = {
|
|
|
108
108
|
}
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
/**
|
|
112
|
-
* 转化 text 和 valueEnum 通过 type 来添加 Status
|
|
113
|
-
*
|
|
114
|
-
* @param text
|
|
115
|
-
* @param valueEnum
|
|
116
|
-
* @param pure 纯净模式,不增加 status
|
|
111
|
+
/**
|
|
112
|
+
* 转化 text 和 valueEnum 通过 type 来添加 Status
|
|
113
|
+
*
|
|
114
|
+
* @param text
|
|
115
|
+
* @param valueEnum
|
|
116
|
+
* @param pure 纯净模式,不增加 status
|
|
117
117
|
*/
|
|
118
118
|
var proFieldParsingText = exports.proFieldParsingText = function proFieldParsingText(text, valueEnumParams, key) {
|
|
119
119
|
if (Array.isArray(text)) {
|
|
@@ -17,12 +17,12 @@ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol
|
|
|
17
17
|
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); }
|
|
18
18
|
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; }
|
|
19
19
|
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); }
|
|
20
|
-
/**
|
|
21
|
-
* 判断一个值是否为普通对象(可以被遍历的对象)
|
|
22
|
-
* 暂时还不支持 Set 和 Map 结构
|
|
23
|
-
*
|
|
24
|
-
* @param itemValue - 要检查的值
|
|
25
|
-
* @returns 如果是普通对象返回 true,否则返回 false
|
|
20
|
+
/**
|
|
21
|
+
* 判断一个值是否为普通对象(可以被遍历的对象)
|
|
22
|
+
* 暂时还不支持 Set 和 Map 结构
|
|
23
|
+
*
|
|
24
|
+
* @param itemValue - 要检查的值
|
|
25
|
+
* @returns 如果是普通对象返回 true,否则返回 false
|
|
26
26
|
*/
|
|
27
27
|
function isPlainObj(itemValue) {
|
|
28
28
|
// 如果不是对象类型,直接返回 false
|
|
@@ -47,12 +47,12 @@ function isPlainObj(itemValue) {
|
|
|
47
47
|
return true;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* 将点号路径字符串转换为路径数组
|
|
52
|
-
* 例如: 'users.0.name' => ['users', 0, 'name']
|
|
53
|
-
*
|
|
54
|
-
* @param dotPath - 点号分隔的路径字符串
|
|
55
|
-
* @returns 路径数组,数字会被转换为数字类型
|
|
50
|
+
/**
|
|
51
|
+
* 将点号路径字符串转换为路径数组
|
|
52
|
+
* 例如: 'users.0.name' => ['users', 0, 'name']
|
|
53
|
+
*
|
|
54
|
+
* @param dotPath - 点号分隔的路径字符串
|
|
55
|
+
* @returns 路径数组,数字会被转换为数字类型
|
|
56
56
|
*/
|
|
57
57
|
function parseDotPath(dotPath) {
|
|
58
58
|
return dotPath.split('.').map(function (segment) {
|
|
@@ -61,11 +61,11 @@ function parseDotPath(dotPath) {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
/**
|
|
65
|
-
* 过滤掉空值的转换配置
|
|
66
|
-
*
|
|
67
|
-
* @param dataFormatMapRaw - 原始转换配置
|
|
68
|
-
* @returns 过滤后的转换配置
|
|
64
|
+
/**
|
|
65
|
+
* 过滤掉空值的转换配置
|
|
66
|
+
*
|
|
67
|
+
* @param dataFormatMapRaw - 原始转换配置
|
|
68
|
+
* @returns 过滤后的转换配置
|
|
69
69
|
*/
|
|
70
70
|
function filterNilTransforms(dataFormatMapRaw) {
|
|
71
71
|
var filtered = {};
|
|
@@ -78,11 +78,11 @@ function filterNilTransforms(dataFormatMapRaw) {
|
|
|
78
78
|
return filtered;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
/**
|
|
82
|
-
* 将转换配置分为点号路径格式和传统嵌套对象格式
|
|
83
|
-
*
|
|
84
|
-
* @param dataFormatMapRaw - 原始转换配置
|
|
85
|
-
* @returns 包含两种格式转换配置的对象
|
|
81
|
+
/**
|
|
82
|
+
* 将转换配置分为点号路径格式和传统嵌套对象格式
|
|
83
|
+
*
|
|
84
|
+
* @param dataFormatMapRaw - 原始转换配置
|
|
85
|
+
* @returns 包含两种格式转换配置的对象
|
|
86
86
|
*/
|
|
87
87
|
function separateTransformFormats(dataFormatMapRaw) {
|
|
88
88
|
var dotPathTransforms = {};
|
|
@@ -102,12 +102,12 @@ function separateTransformFormats(dataFormatMapRaw) {
|
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
/**
|
|
106
|
-
* 处理点号路径格式的转换
|
|
107
|
-
* 例如: 'users.0.name' => 转换 users[0].name 的值
|
|
108
|
-
*
|
|
109
|
-
* @param result - 要转换的数据对象
|
|
110
|
-
* @param dotPathTransforms - 点号路径转换配置
|
|
105
|
+
/**
|
|
106
|
+
* 处理点号路径格式的转换
|
|
107
|
+
* 例如: 'users.0.name' => 转换 users[0].name 的值
|
|
108
|
+
*
|
|
109
|
+
* @param result - 要转换的数据对象
|
|
110
|
+
* @param dotPathTransforms - 点号路径转换配置
|
|
111
111
|
*/
|
|
112
112
|
function processDotPathTransforms(result, dotPathTransforms) {
|
|
113
113
|
for (var dotPath in dotPathTransforms) {
|
|
@@ -150,13 +150,13 @@ function processDotPathTransforms(result, dotPathTransforms) {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
/**
|
|
154
|
-
* 在嵌套转换配置中查找转换函数
|
|
155
|
-
*
|
|
156
|
-
* @param currentTransforms - 当前转换配置
|
|
157
|
-
* @param parentsKey - 父级路径
|
|
158
|
-
* @param entityKey - 当前实体键
|
|
159
|
-
* @returns 找到的转换函数或 undefined
|
|
153
|
+
/**
|
|
154
|
+
* 在嵌套转换配置中查找转换函数
|
|
155
|
+
*
|
|
156
|
+
* @param currentTransforms - 当前转换配置
|
|
157
|
+
* @param parentsKey - 父级路径
|
|
158
|
+
* @param entityKey - 当前实体键
|
|
159
|
+
* @returns 找到的转换函数或 undefined
|
|
160
160
|
*/
|
|
161
161
|
function findNestedTransformFunction(currentTransforms, parentsKey, entityKey) {
|
|
162
162
|
var nestedTransforms = currentTransforms;
|
|
@@ -184,11 +184,11 @@ function findNestedTransformFunction(currentTransforms, parentsKey, entityKey) {
|
|
|
184
184
|
return undefined;
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
/**
|
|
188
|
-
* 检查路径是否包含数组索引
|
|
189
|
-
*
|
|
190
|
-
* @param parentsKey - 父级路径数组
|
|
191
|
-
* @returns 如果包含数组索引返回 true
|
|
187
|
+
/**
|
|
188
|
+
* 检查路径是否包含数组索引
|
|
189
|
+
*
|
|
190
|
+
* @param parentsKey - 父级路径数组
|
|
191
|
+
* @returns 如果包含数组索引返回 true
|
|
192
192
|
*/
|
|
193
193
|
function isInArrayPath(parentsKey) {
|
|
194
194
|
return parentsKey.some(function (key) {
|
|
@@ -196,14 +196,14 @@ function isInArrayPath(parentsKey) {
|
|
|
196
196
|
});
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
/**
|
|
200
|
-
* 递归处理嵌套对象转换(传统格式)
|
|
201
|
-
*
|
|
202
|
-
* @param tempValues - 要处理的值
|
|
203
|
-
* @param parentsKey - 父级路径
|
|
204
|
-
* @param currentTransforms - 当前转换配置
|
|
205
|
-
* @param rootMergeObjects - 存储需要在根级别合并的对象
|
|
206
|
-
* @returns 处理后的结果
|
|
199
|
+
/**
|
|
200
|
+
* 递归处理嵌套对象转换(传统格式)
|
|
201
|
+
*
|
|
202
|
+
* @param tempValues - 要处理的值
|
|
203
|
+
* @param parentsKey - 父级路径
|
|
204
|
+
* @param currentTransforms - 当前转换配置
|
|
205
|
+
* @param rootMergeObjects - 存储需要在根级别合并的对象
|
|
206
|
+
* @returns 处理后的结果
|
|
207
207
|
*/
|
|
208
208
|
function processNestedObjectTransforms(tempValues, parentsKey, currentTransforms, rootMergeObjects) {
|
|
209
209
|
var isArrayValues = Array.isArray(tempValues);
|
|
@@ -278,15 +278,15 @@ function processNestedObjectTransforms(tempValues, parentsKey, currentTransforms
|
|
|
278
278
|
return tempResult;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
/**
|
|
282
|
-
* 转换提交值中的键名
|
|
283
|
-
* 支持两种格式的转换配置:
|
|
284
|
-
* 1. 点号路径格式:'users.0.name' => 转换嵌套路径的值
|
|
285
|
-
* 2. 传统嵌套对象格式:{ users: { 0: { name: transformFn } } }
|
|
286
|
-
*
|
|
287
|
-
* @param values - 要转换的值对象
|
|
288
|
-
* @param dataFormatMapRaw - 转换配置映射
|
|
289
|
-
* @returns 转换后的值对象
|
|
281
|
+
/**
|
|
282
|
+
* 转换提交值中的键名
|
|
283
|
+
* 支持两种格式的转换配置:
|
|
284
|
+
* 1. 点号路径格式:'users.0.name' => 转换嵌套路径的值
|
|
285
|
+
* 2. 传统嵌套对象格式:{ users: { 0: { name: transformFn } } }
|
|
286
|
+
*
|
|
287
|
+
* @param values - 要转换的值对象
|
|
288
|
+
* @param dataFormatMapRaw - 转换配置映射
|
|
289
|
+
* @returns 转换后的值对象
|
|
290
290
|
*/
|
|
291
291
|
var transformKeySubmitValue = exports.transformKeySubmitValue = function transformKeySubmitValue(values, dataFormatMapRaw) {
|
|
292
292
|
// 过滤掉空值的转换配置
|
|
@@ -52,9 +52,9 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
52
52
|
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); } /* eslint-disable react-hooks/exhaustive-deps */
|
|
53
53
|
var noteOnce = _util.warning.noteOnce;
|
|
54
54
|
|
|
55
|
-
/**
|
|
56
|
-
* 显示警告信息
|
|
57
|
-
* @param messageStr
|
|
55
|
+
/**
|
|
56
|
+
* 显示警告信息
|
|
57
|
+
* @param messageStr
|
|
58
58
|
*/
|
|
59
59
|
var warning = function warning(messageStr) {
|
|
60
60
|
return _antd.message.warning(messageStr);
|
|
@@ -64,11 +64,11 @@ var recordKeyToString = exports.recordKeyToString = function recordKeyToString(r
|
|
|
64
64
|
return rowKey;
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
/**
|
|
68
|
-
* 使用map 来删除数据,性能一般 但是准确率比较高
|
|
69
|
-
*
|
|
70
|
-
* @param keyProps
|
|
71
|
-
* @param action
|
|
67
|
+
/**
|
|
68
|
+
* 使用map 来删除数据,性能一般 但是准确率比较高
|
|
69
|
+
*
|
|
70
|
+
* @param keyProps
|
|
71
|
+
* @param action
|
|
72
72
|
*/
|
|
73
73
|
function editableRowByKey(keyProps, action) {
|
|
74
74
|
var _recordKeyToString;
|
|
@@ -80,11 +80,11 @@ function editableRowByKey(keyProps, action) {
|
|
|
80
80
|
var key = (_recordKeyToString = recordKeyToString(keyProps.key)) === null || _recordKeyToString === void 0 ? void 0 : _recordKeyToString.toString();
|
|
81
81
|
var kvMap = new Map();
|
|
82
82
|
|
|
83
|
-
/**
|
|
84
|
-
* 打平这个数组
|
|
85
|
-
*
|
|
86
|
-
* @param records
|
|
87
|
-
* @param parentKey
|
|
83
|
+
/**
|
|
84
|
+
* 打平这个数组
|
|
85
|
+
*
|
|
86
|
+
* @param records
|
|
87
|
+
* @param parentKey
|
|
88
88
|
*/
|
|
89
89
|
function dig(records, map_row_parentKey, map_row_index) {
|
|
90
90
|
records.forEach(function (record, index) {
|
|
@@ -169,10 +169,10 @@ function editableRowByKey(keyProps, action) {
|
|
|
169
169
|
return fill(kvMap);
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
/**
|
|
173
|
-
* 保存按钮的dom
|
|
174
|
-
*
|
|
175
|
-
* @param ActionRenderConfig
|
|
172
|
+
/**
|
|
173
|
+
* 保存按钮的dom
|
|
174
|
+
*
|
|
175
|
+
* @param ActionRenderConfig
|
|
176
176
|
*/
|
|
177
177
|
function SaveEditableAction(_ref, ref) {
|
|
178
178
|
var recordKey = _ref.recordKey,
|
|
@@ -275,10 +275,10 @@ function SaveEditableAction(_ref, ref) {
|
|
|
275
275
|
}, "save");
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
/**
|
|
279
|
-
* 删除按钮 dom
|
|
280
|
-
*
|
|
281
|
-
* @param ActionRenderConfig
|
|
278
|
+
/**
|
|
279
|
+
* 删除按钮 dom
|
|
280
|
+
*
|
|
281
|
+
* @param ActionRenderConfig
|
|
282
282
|
*/
|
|
283
283
|
var DeleteEditableAction = exports.DeleteEditableAction = function DeleteEditableAction(_ref4) {
|
|
284
284
|
var recordKey = _ref4.recordKey,
|
|
@@ -418,17 +418,17 @@ function defaultActionRender(row, config) {
|
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
420
|
|
|
421
|
-
/**
|
|
422
|
-
* 一个方便的hooks 用于维护编辑的状态
|
|
423
|
-
*
|
|
424
|
-
* @param props
|
|
421
|
+
/**
|
|
422
|
+
* 一个方便的hooks 用于维护编辑的状态
|
|
423
|
+
*
|
|
424
|
+
* @param props
|
|
425
425
|
*/
|
|
426
426
|
function useEditableArray(props) {
|
|
427
427
|
// Internationalization
|
|
428
428
|
var intl = (0, _vtxProvider.useIntl)();
|
|
429
429
|
|
|
430
|
-
/**
|
|
431
|
-
* 点击开始编辑之前的保存数据用的
|
|
430
|
+
/**
|
|
431
|
+
* 点击开始编辑之前的保存数据用的
|
|
432
432
|
*/
|
|
433
433
|
var preEditRowRef = (0, _react.useRef)(null);
|
|
434
434
|
var _useState = (0, _react.useState)(undefined),
|
|
@@ -516,10 +516,10 @@ function useEditableArray(props) {
|
|
|
516
516
|
};
|
|
517
517
|
});
|
|
518
518
|
|
|
519
|
-
/**
|
|
520
|
-
* 进入编辑状态
|
|
521
|
-
*
|
|
522
|
-
* @param recordKey
|
|
519
|
+
/**
|
|
520
|
+
* 进入编辑状态
|
|
521
|
+
*
|
|
522
|
+
* @param recordKey
|
|
523
523
|
*/
|
|
524
524
|
var startEditable = (0, _.useRefFunction)(function (recordKey, record) {
|
|
525
525
|
var _ref7, _props$dataSource;
|
|
@@ -538,10 +538,10 @@ function useEditableArray(props) {
|
|
|
538
538
|
return true;
|
|
539
539
|
});
|
|
540
540
|
|
|
541
|
-
/**
|
|
542
|
-
* 退出编辑状态
|
|
543
|
-
*
|
|
544
|
-
* @param recordKey
|
|
541
|
+
/**
|
|
542
|
+
* 退出编辑状态
|
|
543
|
+
*
|
|
544
|
+
* @param recordKey
|
|
545
545
|
*/
|
|
546
546
|
var cancelEditable = (0, _.useRefFunction)( /*#__PURE__*/function () {
|
|
547
547
|
var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(recordKey, needReTry) {
|
|
@@ -647,11 +647,11 @@ function useEditableArray(props) {
|
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
649
|
}, [saveRefsMap, editableKeysSet]);
|
|
650
|
-
/**
|
|
651
|
-
* 保存编辑行
|
|
652
|
-
*
|
|
653
|
-
* @param recordKey
|
|
654
|
-
* @param needReTry
|
|
650
|
+
/**
|
|
651
|
+
* 保存编辑行
|
|
652
|
+
*
|
|
653
|
+
* @param recordKey
|
|
654
|
+
* @param needReTry
|
|
655
655
|
*/
|
|
656
656
|
var saveEditable = (0, _.useRefFunction)( /*#__PURE__*/function () {
|
|
657
657
|
var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(recordKey, needReTry) {
|
|
@@ -698,12 +698,12 @@ function useEditableArray(props) {
|
|
|
698
698
|
};
|
|
699
699
|
}());
|
|
700
700
|
|
|
701
|
-
/**
|
|
702
|
-
* 同时只能支持一行,取消之后数据消息,不会触发 dataSource
|
|
703
|
-
*
|
|
704
|
-
* @param row
|
|
705
|
-
* @param options
|
|
706
|
-
* @name 增加新的行
|
|
701
|
+
/**
|
|
702
|
+
* 同时只能支持一行,取消之后数据消息,不会触发 dataSource
|
|
703
|
+
*
|
|
704
|
+
* @param row
|
|
705
|
+
* @param options
|
|
706
|
+
* @name 增加新的行
|
|
707
707
|
*/
|
|
708
708
|
var addEditRecord = (0, _.useRefFunction)(function (row, options) {
|
|
709
709
|
if (options !== null && options !== void 0 && options.parentKey && !dataSourceKeyIndexMapRef.current.has(recordKeyToString(options === null || options === void 0 ? void 0 : options.parentKey).toString())) {
|
|
@@ -25,19 +25,19 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
25
25
|
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; }
|
|
26
26
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
27
27
|
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); } /* eslint-disable react-hooks/exhaustive-deps */
|
|
28
|
-
/**
|
|
29
|
-
* 显示警告信息
|
|
30
|
-
* @param messageStr
|
|
28
|
+
/**
|
|
29
|
+
* 显示警告信息
|
|
30
|
+
* @param messageStr
|
|
31
31
|
*/
|
|
32
32
|
var warning = function warning(messageStr) {
|
|
33
33
|
return _antd.message.warning(messageStr);
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* 使用map 来删除数据,性能一般 但是准确率比较高
|
|
38
|
-
*
|
|
39
|
-
* @param params
|
|
40
|
-
* @param action
|
|
36
|
+
/**
|
|
37
|
+
* 使用map 来删除数据,性能一般 但是准确率比较高
|
|
38
|
+
*
|
|
39
|
+
* @param params
|
|
40
|
+
* @param action
|
|
41
41
|
*/
|
|
42
42
|
function editableRowByKey(_ref) {
|
|
43
43
|
var data = _ref.data,
|
|
@@ -45,14 +45,14 @@ function editableRowByKey(_ref) {
|
|
|
45
45
|
return _objectSpread(_objectSpread({}, data), row);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
/**
|
|
49
|
-
* 一个方便的hooks 用于维护编辑的状态
|
|
50
|
-
*
|
|
51
|
-
* @param props
|
|
48
|
+
/**
|
|
49
|
+
* 一个方便的hooks 用于维护编辑的状态
|
|
50
|
+
*
|
|
51
|
+
* @param props
|
|
52
52
|
*/
|
|
53
53
|
function useEditableMap(props) {
|
|
54
|
-
/**
|
|
55
|
-
* 点击开始编辑之前的保存数据用的
|
|
54
|
+
/**
|
|
55
|
+
* 点击开始编辑之前的保存数据用的
|
|
56
56
|
*/
|
|
57
57
|
var preEditRowRef = (0, _react.useRef)(null);
|
|
58
58
|
var editableType = props.type || 'single';
|
|
@@ -84,10 +84,10 @@ function useEditableMap(props) {
|
|
|
84
84
|
return false;
|
|
85
85
|
}, [(editableKeys || []).join(',')]);
|
|
86
86
|
|
|
87
|
-
/**
|
|
88
|
-
* 进入编辑状态
|
|
89
|
-
*
|
|
90
|
-
* @param recordKey
|
|
87
|
+
/**
|
|
88
|
+
* 进入编辑状态
|
|
89
|
+
*
|
|
90
|
+
* @param recordKey
|
|
91
91
|
*/
|
|
92
92
|
var startEditable = function startEditable(recordKey, recordValue) {
|
|
93
93
|
var _ref2;
|
|
@@ -102,10 +102,10 @@ function useEditableMap(props) {
|
|
|
102
102
|
return true;
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
-
/**
|
|
106
|
-
* 退出编辑状态
|
|
107
|
-
*
|
|
108
|
-
* @param recordKey
|
|
105
|
+
/**
|
|
106
|
+
* 退出编辑状态
|
|
107
|
+
*
|
|
108
|
+
* @param recordKey
|
|
109
109
|
*/
|
|
110
110
|
var cancelEditable = function cancelEditable(recordKey) {
|
|
111
111
|
// 防止多次渲染
|
|
@@ -44,11 +44,11 @@ var MediaQueryEnum = exports.MediaQueryEnum = {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
/**
|
|
48
|
-
* loop query screen className
|
|
49
|
-
* Array.find will throw a error
|
|
50
|
-
* `Rendered more hooks than during the previous render.`
|
|
51
|
-
* So should use Array.forEach
|
|
47
|
+
/**
|
|
48
|
+
* loop query screen className
|
|
49
|
+
* Array.find will throw a error
|
|
50
|
+
* `Rendered more hooks than during the previous render.`
|
|
51
|
+
* So should use Array.forEach
|
|
52
52
|
*/
|
|
53
53
|
var getScreenClassName = exports.getScreenClassName = function getScreenClassName() {
|
|
54
54
|
var queryKey = undefined;
|
|
@@ -51,7 +51,8 @@ function VtxCombogrid(props, ref) {
|
|
|
51
51
|
searchForms = _props$searchForms === void 0 ? [] : _props$searchForms,
|
|
52
52
|
selectedRowKeys = props.selectedRowKeys,
|
|
53
53
|
setSelectedRowKeys = props.setSelectedRowKeys,
|
|
54
|
-
spread = props.spread,
|
|
54
|
+
_props$spread = props.spread,
|
|
55
|
+
spread = _props$spread === void 0 ? false : _props$spread,
|
|
55
56
|
defaultPageSize = props.defaultPageSize,
|
|
56
57
|
_props$customEnumText = props.customEnumText,
|
|
57
58
|
customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText,
|
|
@@ -138,16 +139,16 @@ function VtxCombogrid(props, ref) {
|
|
|
138
139
|
});
|
|
139
140
|
}
|
|
140
141
|
|
|
141
|
-
//
|
|
142
|
+
// 重置会清空 selectedRowKeys,因此也需清空文本中的 value 值
|
|
142
143
|
var query = function query() {
|
|
143
144
|
submit();
|
|
144
|
-
if (multiple && selectedRowKeys.length) {
|
|
145
|
+
if (!spread && multiple && selectedRowKeys.length) {
|
|
145
146
|
clearSelectedRow();
|
|
146
147
|
}
|
|
147
148
|
};
|
|
148
149
|
var clear = function clear() {
|
|
149
150
|
reset();
|
|
150
|
-
if (multiple && selectedRowKeys.length) {
|
|
151
|
+
if (!spread && multiple && selectedRowKeys.length) {
|
|
151
152
|
clearSelectedRow();
|
|
152
153
|
}
|
|
153
154
|
};
|
|
@@ -10,7 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
10
10
|
var _Combogrid = _interopRequireDefault(require("./Combogrid"));
|
|
11
11
|
var _antd = require("antd");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
var _excluded = ["className", "style", "placeholder", "prefixCls", "value", "allowClear", "selectedRowKeys", "popoverProps", "inputProps", "content", "disabled"];
|
|
13
|
+
var _excluded = ["className", "style", "placeholder", "prefixCls", "value", "allowClear", "selectedRowKeys", "popoverProps", "inputProps", "content", "disabled", "spread"];
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
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); }
|
|
16
16
|
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; }
|
|
@@ -57,6 +57,8 @@ var VtxCombogrid = exports.VtxCombogrid = /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
57
57
|
content = _props$content === void 0 ? null : _props$content,
|
|
58
58
|
_props$disabled = props.disabled,
|
|
59
59
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
60
|
+
_props$spread = props.spread,
|
|
61
|
+
spread = _props$spread === void 0 ? false : _props$spread,
|
|
60
62
|
rest = _objectWithoutProperties(props, _excluded);
|
|
61
63
|
(0, _react.useEffect)(function () {
|
|
62
64
|
setSelectedRowKeys(defaultSelectedRowKeys);
|
|
@@ -80,11 +82,12 @@ var VtxCombogrid = exports.VtxCombogrid = /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
80
82
|
defaultSelectedRowKeys: defaultSelectedRowKeys,
|
|
81
83
|
setSelectedRowKeys: setSelectedRowKeys,
|
|
82
84
|
setPopoverVisible: setVisible,
|
|
85
|
+
spread: spread,
|
|
83
86
|
ref: comboRef
|
|
84
87
|
})),
|
|
85
88
|
trigger: "click",
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
open: disabled ? false : visible,
|
|
90
|
+
onOpenChange: function onOpenChange(visible) {
|
|
88
91
|
return setVisible(visible);
|
|
89
92
|
},
|
|
90
93
|
classNames: {
|
|
@@ -117,7 +120,7 @@ var _default = exports.default = VtxCombogrid;
|
|
|
117
120
|
VtxCombogrid.propTypes = {
|
|
118
121
|
prefixCls: _propTypes.default.string,
|
|
119
122
|
placeholder: _propTypes.default.string,
|
|
120
|
-
value: _propTypes.default.string,
|
|
123
|
+
value: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array]),
|
|
121
124
|
allowClear: _propTypes.default.bool,
|
|
122
125
|
disabled: _propTypes.default.bool,
|
|
123
126
|
className: _propTypes.default.string,
|