@hw-component/form 0.0.1-beta → 0.0.1-beta-v2
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/CheckboxGroup/CheckBox/index.js +16 -24
- package/es/CheckboxGroup/hooks.d.ts +3 -9
- package/es/CheckboxGroup/hooks.js +64 -115
- package/es/CheckboxGroup/index.d.ts +1 -6
- package/es/CheckboxGroup/index.js +58 -117
- package/es/CheckboxGroup/modal.d.ts +8 -9
- package/es/Form/Context/FormConfigProvider.js +19 -64
- package/es/Form/Context/index.d.ts +1 -4
- package/es/Form/Context/index.js +3 -3
- package/es/Form/FormItem/BasicItem.js +42 -80
- package/es/Form/FormItem/Helper.d.ts +1 -1
- package/es/Form/FormItem/Helper.js +9 -17
- package/es/Form/FormItem/RegularFormItem.js +8 -11
- package/es/Form/FormItem/UpFormItem.d.ts +1 -6
- package/es/Form/FormItem/UpFormItem.js +17 -27
- package/es/Form/FormItem/hooks.d.ts +4 -21
- package/es/Form/FormItem/hooks.js +9 -12
- package/es/Form/FormItem/index.js +5 -5
- package/es/Form/HFormConnect.d.ts +1 -9
- package/es/Form/HFormConnect.js +30 -90
- package/es/Form/InitSet.d.ts +1 -4
- package/es/Form/InitSet.js +6 -7
- package/es/Form/Label.d.ts +4 -4
- package/es/Form/Label.js +19 -36
- package/es/Form/config.d.ts +22 -100
- package/es/Form/config.js +19 -19
- package/es/Form/hooks/index.d.ts +1 -14
- package/es/Form/hooks/index.js +32 -80
- package/es/Form/hooks/useHForm.js +143 -224
- package/es/Form/hooks/useInitConfigData.d.ts +1 -4
- package/es/Form/hooks/useInitConfigData.js +61 -143
- package/es/Form/index.d.ts +1 -11
- package/es/Form/index.js +79 -79
- package/es/Form/modal.d.ts +54 -89
- package/es/Input/ButtonInput.js +51 -73
- package/es/Input/InputNumber.js +12 -21
- package/es/Input/SelectInput.d.ts +4 -16
- package/es/Input/SelectInput.js +62 -116
- package/es/Input/defaultConfig.d.ts +3 -3
- package/es/Input/defaultConfig.js +2 -2
- package/es/Input/index.js +7 -7
- package/es/Input/modal.d.ts +13 -15
- package/es/ModalForm/hooks.d.ts +12 -0
- package/es/ModalForm/hooks.js +63 -0
- package/es/ModalForm/index.d.ts +4 -0
- package/es/ModalForm/index.js +72 -0
- package/es/ModalForm/modal.d.ts +20 -0
- package/es/PageHandler/ErrorComponent.js +25 -47
- package/es/PageHandler/LoadingComponent.js +13 -17
- package/es/PageHandler/index.js +7 -7
- package/es/PageHandler/modal.d.ts +4 -4
- package/es/RadioGroup/index.d.ts +5 -12
- package/es/RadioGroup/index.js +33 -46
- package/es/Select/components/AllSelect.d.ts +1 -1
- package/es/Select/components/AllSelect.js +18 -40
- package/es/Select/components/CheckBoxOption.d.ts +3 -6
- package/es/Select/components/CheckBoxOption.js +7 -12
- package/es/Select/components/DropdownComponent.d.ts +4 -4
- package/es/Select/components/DropdownComponent.js +17 -30
- package/es/Select/components/NoFindItem.d.ts +1 -1
- package/es/Select/components/NoFindItem.js +7 -11
- package/es/Select/components/NotFoundContent.d.ts +2 -2
- package/es/Select/components/NotFoundContent.js +27 -49
- package/es/Select/defaultConfig.d.ts +1 -1
- package/es/Select/defaultConfig.js +16 -20
- package/es/Select/hooks/changeHooks.d.ts +2 -2
- package/es/Select/hooks/changeHooks.js +71 -147
- package/es/Select/hooks/norHooks.d.ts +9 -27
- package/es/Select/hooks/norHooks.js +39 -51
- package/es/Select/index.d.ts +1 -22
- package/es/Select/index.js +65 -124
- package/es/Select/modal.d.ts +15 -15
- package/es/Select/utils.js +15 -60
- package/es/Submit/index.d.ts +3 -9
- package/es/Submit/index.js +13 -18
- package/es/Switch/index.d.ts +4 -4
- package/es/Switch/index.js +20 -46
- package/es/TDPicker/RangePicker.d.ts +3 -8
- package/es/TDPicker/RangePicker.js +67 -138
- package/es/TDPicker/TimePicker.d.ts +1 -6
- package/es/TDPicker/TimePicker.js +13 -19
- package/es/TDPicker/hooks.d.ts +22 -42
- package/es/TDPicker/hooks.js +72 -106
- package/es/TDPicker/index.d.ts +1 -7
- package/es/TDPicker/index.js +14 -20
- package/es/TDPicker/modal.d.ts +16 -21
- package/es/TextArea/index.d.ts +1 -0
- package/es/Upload/Btn.d.ts +1 -5
- package/es/Upload/Btn.js +19 -35
- package/es/Upload/MediaTypeEle/TypeEle.d.ts +5 -10
- package/es/Upload/MediaTypeEle/TypeEle.js +23 -31
- package/es/Upload/MediaTypeEle/index.d.ts +1 -5
- package/es/Upload/MediaTypeEle/index.js +18 -21
- package/es/Upload/Preview/index.d.ts +1 -5
- package/es/Upload/Preview/index.js +13 -17
- package/es/Upload/UrlUpload/index.d.ts +1 -7
- package/es/Upload/UrlUpload/index.js +51 -72
- package/es/Upload/enums.d.ts +3 -3
- package/es/Upload/enums.js +3 -3
- package/es/Upload/hooks/change.d.ts +1 -8
- package/es/Upload/hooks/change.js +58 -115
- package/es/Upload/hooks/customRequest.d.ts +1 -5
- package/es/Upload/hooks/customRequest.js +46 -63
- package/es/Upload/hooks/propsMaker.d.ts +1 -5
- package/es/Upload/hooks/propsMaker.js +13 -52
- package/es/Upload/index.d.ts +1 -3
- package/es/Upload/index.js +61 -131
- package/es/Upload/modal.d.ts +15 -17
- package/es/Upload/util.d.ts +2 -8
- package/es/Upload/util.js +7 -15
- package/es/config.js +31 -34
- package/es/hooks/index.d.ts +7 -14
- package/es/hooks/index.js +49 -124
- package/es/index.d.ts +18 -98
- package/es/index.js +8 -22
- package/es/modal.d.ts +6 -6
- package/lib/CheckboxGroup/CheckBox/index.js +18 -26
- package/lib/CheckboxGroup/hooks.d.ts +3 -9
- package/lib/CheckboxGroup/hooks.js +65 -116
- package/lib/CheckboxGroup/index.d.ts +1 -6
- package/lib/CheckboxGroup/index.js +60 -119
- package/lib/CheckboxGroup/modal.d.ts +8 -9
- package/lib/Form/Context/FormConfigProvider.js +21 -66
- package/lib/Form/Context/index.d.ts +1 -4
- package/lib/Form/Context/index.js +4 -4
- package/lib/Form/FormItem/BasicItem.js +44 -82
- package/lib/Form/FormItem/Helper.d.ts +1 -1
- package/lib/Form/FormItem/Helper.js +11 -19
- package/lib/Form/FormItem/RegularFormItem.js +10 -13
- package/lib/Form/FormItem/UpFormItem.d.ts +1 -6
- package/lib/Form/FormItem/UpFormItem.js +19 -29
- package/lib/Form/FormItem/hooks.d.ts +4 -21
- package/lib/Form/FormItem/hooks.js +10 -13
- package/lib/Form/FormItem/index.js +7 -7
- package/lib/Form/HFormConnect.d.ts +1 -9
- package/lib/Form/HFormConnect.js +32 -92
- package/lib/Form/InitSet.d.ts +1 -4
- package/lib/Form/InitSet.js +8 -9
- package/lib/Form/Label.d.ts +4 -4
- package/lib/Form/Label.js +21 -41
- package/lib/Form/config.d.ts +22 -100
- package/lib/Form/config.js +21 -21
- package/lib/Form/hooks/index.d.ts +1 -14
- package/lib/Form/hooks/index.js +32 -81
- package/lib/Form/hooks/useHForm.js +145 -226
- package/lib/Form/hooks/useInitConfigData.d.ts +1 -4
- package/lib/Form/hooks/useInitConfigData.js +63 -144
- package/lib/Form/index.d.ts +1 -11
- package/lib/Form/index.js +83 -83
- package/lib/Form/modal.d.ts +54 -89
- package/lib/Input/ButtonInput.js +53 -75
- package/lib/Input/InputNumber.js +14 -23
- package/lib/Input/SelectInput.d.ts +4 -16
- package/lib/Input/SelectInput.js +66 -128
- package/lib/Input/defaultConfig.d.ts +3 -3
- package/lib/Input/defaultConfig.js +3 -3
- package/lib/Input/index.js +9 -9
- package/lib/Input/modal.d.ts +13 -15
- package/lib/ModalForm/hooks.d.ts +12 -0
- package/lib/ModalForm/hooks.js +66 -0
- package/lib/ModalForm/index.d.ts +4 -0
- package/lib/ModalForm/index.js +75 -0
- package/lib/ModalForm/modal.d.ts +20 -0
- package/lib/PageHandler/ErrorComponent.js +27 -49
- package/lib/PageHandler/LoadingComponent.js +15 -19
- package/lib/PageHandler/index.js +9 -9
- package/lib/PageHandler/modal.d.ts +4 -4
- package/lib/RadioGroup/index.d.ts +5 -12
- package/lib/RadioGroup/index.js +35 -48
- package/lib/Select/components/AllSelect.d.ts +1 -1
- package/lib/Select/components/AllSelect.js +20 -42
- package/lib/Select/components/CheckBoxOption.d.ts +3 -6
- package/lib/Select/components/CheckBoxOption.js +9 -14
- package/lib/Select/components/DropdownComponent.d.ts +4 -4
- package/lib/Select/components/DropdownComponent.js +19 -32
- package/lib/Select/components/NoFindItem.d.ts +1 -1
- package/lib/Select/components/NoFindItem.js +9 -13
- package/lib/Select/components/NotFoundContent.d.ts +2 -2
- package/lib/Select/components/NotFoundContent.js +29 -51
- package/lib/Select/defaultConfig.d.ts +1 -1
- package/lib/Select/defaultConfig.js +17 -21
- package/lib/Select/hooks/changeHooks.d.ts +2 -2
- package/lib/Select/hooks/changeHooks.js +72 -148
- package/lib/Select/hooks/norHooks.d.ts +9 -27
- package/lib/Select/hooks/norHooks.js +40 -52
- package/lib/Select/index.d.ts +1 -22
- package/lib/Select/index.js +67 -128
- package/lib/Select/modal.d.ts +15 -15
- package/lib/Select/utils.js +16 -61
- package/lib/Submit/index.d.ts +3 -9
- package/lib/Submit/index.js +15 -20
- package/lib/Switch/index.d.ts +4 -4
- package/lib/Switch/index.js +22 -48
- package/lib/TDPicker/RangePicker.d.ts +3 -8
- package/lib/TDPicker/RangePicker.js +69 -136
- package/lib/TDPicker/TimePicker.d.ts +1 -6
- package/lib/TDPicker/TimePicker.js +15 -21
- package/lib/TDPicker/hooks.d.ts +22 -42
- package/lib/TDPicker/hooks.js +72 -98
- package/lib/TDPicker/index.d.ts +1 -7
- package/lib/TDPicker/index.js +16 -22
- package/lib/TDPicker/modal.d.ts +16 -21
- package/lib/TextArea/index.d.ts +1 -0
- package/lib/Upload/Btn.d.ts +1 -5
- package/lib/Upload/Btn.js +21 -37
- package/lib/Upload/MediaTypeEle/TypeEle.d.ts +5 -10
- package/lib/Upload/MediaTypeEle/TypeEle.js +25 -33
- package/lib/Upload/MediaTypeEle/index.d.ts +1 -5
- package/lib/Upload/MediaTypeEle/index.js +20 -23
- package/lib/Upload/Preview/index.d.ts +1 -5
- package/lib/Upload/Preview/index.js +15 -19
- package/lib/Upload/UrlUpload/index.d.ts +1 -7
- package/lib/Upload/UrlUpload/index.js +53 -74
- package/lib/Upload/enums.d.ts +3 -3
- package/lib/Upload/enums.js +4 -4
- package/lib/Upload/hooks/change.d.ts +1 -8
- package/lib/Upload/hooks/change.js +59 -116
- package/lib/Upload/hooks/customRequest.d.ts +1 -5
- package/lib/Upload/hooks/customRequest.js +47 -64
- package/lib/Upload/hooks/propsMaker.d.ts +1 -5
- package/lib/Upload/hooks/propsMaker.js +15 -55
- package/lib/Upload/index.d.ts +1 -3
- package/lib/Upload/index.js +63 -133
- package/lib/Upload/modal.d.ts +15 -17
- package/lib/Upload/util.d.ts +2 -8
- package/lib/Upload/util.js +8 -16
- package/lib/config.js +32 -35
- package/lib/hooks/index.d.ts +7 -14
- package/lib/hooks/index.js +50 -125
- package/lib/index.d.ts +18 -98
- package/lib/index.js +10 -5
- package/lib/modal.d.ts +6 -6
- package/package.json +1 -1
- package/src/components/Form/InitSet.tsx +3 -5
- package/src/components/Form/hooks/index.ts +0 -20
- package/src/components/Form/hooks/useHForm.ts +8 -4
- package/src/components/Form/index.tsx +25 -7
- package/src/components/Form/modal.ts +4 -2
- package/src/components/Input/SelectInput.tsx +3 -2
- package/src/components/Input/modal.ts +2 -0
- package/src/components/ModalForm/hooks.ts +45 -0
- package/src/components/ModalForm/index.tsx +69 -0
- package/src/components/ModalForm/modal.ts +22 -0
- package/src/components/index.tsx +4 -0
- package/src/pages/ModalForm/index.tsx +127 -0
- package/src/routes.tsx +6 -1
package/es/Upload/index.js
CHANGED
|
@@ -1,75 +1,26 @@
|
|
|
1
1
|
// welcome to hoo hoo hoo
|
|
2
|
-
import _Object$keys from
|
|
3
|
-
import _Object$getOwnPropertySymbols from
|
|
4
|
-
import _filterInstanceProperty from
|
|
5
|
-
import _Object$getOwnPropertyDescriptor from
|
|
6
|
-
import _forEachInstanceProperty from
|
|
7
|
-
import _Object$getOwnPropertyDescriptors from
|
|
8
|
-
import _Object$defineProperties from
|
|
9
|
-
import _Object$defineProperty from
|
|
10
|
-
import _extends from
|
|
11
|
-
import _defineProperty from
|
|
12
|
-
import _slicedToArray from
|
|
13
|
-
import _objectWithoutProperties from
|
|
14
|
-
import { Upload } from
|
|
15
|
-
import Btn from
|
|
16
|
-
import React, { useState, useImperativeHandle, useMemo } from
|
|
17
|
-
import Preview from
|
|
18
|
-
import { useChange } from
|
|
19
|
-
import { useProps } from
|
|
2
|
+
import _Object$keys from '@babel/runtime-corejs3/core-js/object/keys';
|
|
3
|
+
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js/object/get-own-property-symbols';
|
|
4
|
+
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js/instance/filter';
|
|
5
|
+
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptor';
|
|
6
|
+
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js/instance/for-each';
|
|
7
|
+
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptors';
|
|
8
|
+
import _Object$defineProperties from '@babel/runtime-corejs3/core-js/object/define-properties';
|
|
9
|
+
import _Object$defineProperty from '@babel/runtime-corejs3/core-js/object/define-property';
|
|
10
|
+
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
11
|
+
import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
|
|
12
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
13
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
14
|
+
import { Upload } from 'antd';
|
|
15
|
+
import Btn from './Btn.js';
|
|
16
|
+
import React, { useState, useImperativeHandle, useMemo } from 'react';
|
|
17
|
+
import Preview from './Preview/index.js';
|
|
18
|
+
import { useChange } from './hooks/change.js';
|
|
19
|
+
import { useProps } from './hooks/propsMaker.js';
|
|
20
20
|
|
|
21
|
-
var _excluded = [
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"listType",
|
|
25
|
-
"exFiles",
|
|
26
|
-
"maxCount",
|
|
27
|
-
"maxRowNum",
|
|
28
|
-
"onPreview",
|
|
29
|
-
"request",
|
|
30
|
-
"maxSize",
|
|
31
|
-
];
|
|
32
|
-
function ownKeys(object, enumerableOnly) {
|
|
33
|
-
var keys = _Object$keys(object);
|
|
34
|
-
if (_Object$getOwnPropertySymbols) {
|
|
35
|
-
var symbols = _Object$getOwnPropertySymbols(object);
|
|
36
|
-
enumerableOnly &&
|
|
37
|
-
(symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) {
|
|
38
|
-
return _Object$getOwnPropertyDescriptor(object, sym).enumerable;
|
|
39
|
-
})),
|
|
40
|
-
keys.push.apply(keys, symbols);
|
|
41
|
-
}
|
|
42
|
-
return keys;
|
|
43
|
-
}
|
|
44
|
-
function _objectSpread(target) {
|
|
45
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
46
|
-
var _context, _context2;
|
|
47
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
48
|
-
i % 2
|
|
49
|
-
? _forEachInstanceProperty((_context = ownKeys(Object(source), !0))).call(
|
|
50
|
-
_context,
|
|
51
|
-
function (key) {
|
|
52
|
-
_defineProperty(target, key, source[key]);
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
: _Object$getOwnPropertyDescriptors
|
|
56
|
-
? _Object$defineProperties(
|
|
57
|
-
target,
|
|
58
|
-
_Object$getOwnPropertyDescriptors(source)
|
|
59
|
-
)
|
|
60
|
-
: _forEachInstanceProperty((_context2 = ownKeys(Object(source)))).call(
|
|
61
|
-
_context2,
|
|
62
|
-
function (key) {
|
|
63
|
-
_Object$defineProperty(
|
|
64
|
-
target,
|
|
65
|
-
key,
|
|
66
|
-
_Object$getOwnPropertyDescriptor(source, key)
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
return target;
|
|
72
|
-
}
|
|
21
|
+
var _excluded = ["value", "onChange", "listType", "exFiles", "maxCount", "maxRowNum", "onPreview", "request", "maxSize"];
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
73
24
|
var Index = function Index(_ref, ref) {
|
|
74
25
|
var _ref$value = _ref.value,
|
|
75
26
|
value = _ref$value === void 0 ? [] : _ref$value,
|
|
@@ -88,40 +39,31 @@ var Index = function Index(_ref, ref) {
|
|
|
88
39
|
var matchProps = useProps({
|
|
89
40
|
request: request,
|
|
90
41
|
exFiles: exFiles,
|
|
91
|
-
maxSize: maxSize
|
|
42
|
+
maxSize: maxSize
|
|
92
43
|
});
|
|
93
44
|
var _useState = useState({}),
|
|
94
45
|
_useState2 = _slicedToArray(_useState, 2),
|
|
95
46
|
previewModal = _useState2[0],
|
|
96
47
|
setPreviewModal = _useState2[1];
|
|
97
|
-
var change = useChange(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
value: value,
|
|
103
|
-
maxCount: maxCount,
|
|
104
|
-
onChange: onChange,
|
|
105
|
-
}
|
|
106
|
-
)
|
|
107
|
-
);
|
|
48
|
+
var change = useChange(_objectSpread(_objectSpread({}, matchProps), {}, {
|
|
49
|
+
value: value,
|
|
50
|
+
maxCount: maxCount,
|
|
51
|
+
onChange: onChange
|
|
52
|
+
}));
|
|
108
53
|
useImperativeHandle(ref, function () {
|
|
109
54
|
return {
|
|
110
|
-
change: change
|
|
55
|
+
change: change
|
|
111
56
|
};
|
|
112
57
|
});
|
|
113
|
-
var contentStyle = useMemo(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
},
|
|
123
|
-
[maxRowNum, listType]
|
|
124
|
-
);
|
|
58
|
+
var contentStyle = useMemo(function () {
|
|
59
|
+
if (listType !== "picture-card") {
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
width: 112 * maxRowNum,
|
|
64
|
+
maxWidth: "100%"
|
|
65
|
+
};
|
|
66
|
+
}, [maxRowNum, listType]);
|
|
125
67
|
var preview = function preview(file) {
|
|
126
68
|
if (onPreview) {
|
|
127
69
|
onPreview(file);
|
|
@@ -129,48 +71,36 @@ var Index = function Index(_ref, ref) {
|
|
|
129
71
|
}
|
|
130
72
|
setPreviewModal({
|
|
131
73
|
visible: true,
|
|
132
|
-
file: file
|
|
74
|
+
file: file
|
|
133
75
|
});
|
|
134
76
|
};
|
|
135
77
|
var maxNum = maxCount === 1 ? maxCount : Number.MAX_VALUE;
|
|
136
78
|
var visible = previewModal.visible,
|
|
137
79
|
previewFile = previewModal.file;
|
|
138
|
-
return /*#__PURE__*/
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
maxCount: maxCount,
|
|
161
|
-
listType: listType,
|
|
162
|
-
})
|
|
163
|
-
),
|
|
164
|
-
/*#__PURE__*/ React.createElement(Preview, {
|
|
165
|
-
visible: visible,
|
|
166
|
-
file: previewFile,
|
|
167
|
-
onCancel: function onCancel() {
|
|
168
|
-
setPreviewModal({});
|
|
169
|
-
},
|
|
170
|
-
})
|
|
171
|
-
);
|
|
80
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
81
|
+
style: contentStyle
|
|
82
|
+
}, /*#__PURE__*/React.createElement(Upload, _extends({
|
|
83
|
+
listType: listType,
|
|
84
|
+
maxCount: maxNum,
|
|
85
|
+
fileList: value,
|
|
86
|
+
onPreview: preview,
|
|
87
|
+
onChange: change,
|
|
88
|
+
beforeUpload: function beforeUpload() {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
}, props), /*#__PURE__*/React.createElement(Btn, {
|
|
92
|
+
value: value,
|
|
93
|
+
maxCount: maxCount,
|
|
94
|
+
listType: listType
|
|
95
|
+
})), /*#__PURE__*/React.createElement(Preview, {
|
|
96
|
+
visible: visible,
|
|
97
|
+
file: previewFile,
|
|
98
|
+
onCancel: function onCancel() {
|
|
99
|
+
setPreviewModal({});
|
|
100
|
+
}
|
|
101
|
+
}));
|
|
172
102
|
};
|
|
173
|
-
var HUpload = /*#__PURE__*/
|
|
103
|
+
var HUpload = /*#__PURE__*/React.forwardRef(Index);
|
|
174
104
|
|
|
175
105
|
export { HUpload as default };
|
|
176
106
|
// powered by hdj
|
package/es/Upload/modal.d.ts
CHANGED
|
@@ -4,27 +4,25 @@ import type { BeforeUploadFileType, RcFile } from "rc-upload/lib/interface";
|
|
|
4
4
|
import type { UploadChangeParam } from "antd/lib/upload/interface";
|
|
5
5
|
import type { MediaTypeEnum } from "@/components/Upload/enums";
|
|
6
6
|
export interface IUpLoadProps extends Omit<UploadProps, "onChange"> {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
maxRowNum?: number;
|
|
17
|
-
maxSize?: number;
|
|
7
|
+
exFiles?: string[];
|
|
8
|
+
request?: (file: Exclude<BeforeUploadFileType, File | boolean> | RcFile) => Promise<{
|
|
9
|
+
url: string;
|
|
10
|
+
}>;
|
|
11
|
+
errorType?: "alert" | "show";
|
|
12
|
+
onChange?: (fileList: UploadFile[]) => void;
|
|
13
|
+
value?: UploadFile[];
|
|
14
|
+
maxRowNum?: number;
|
|
15
|
+
maxSize?: number;
|
|
18
16
|
}
|
|
19
17
|
export interface IMediaTypeEleProps {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
file?: UploadFile;
|
|
19
|
+
onReady?: VoidFunction;
|
|
20
|
+
onError?: VoidFunction;
|
|
23
21
|
}
|
|
24
22
|
export interface IUploadRefModal {
|
|
25
|
-
|
|
23
|
+
change: (info: UploadChangeParam<UploadFile>) => void;
|
|
26
24
|
}
|
|
27
25
|
export interface IUrlUploadProps extends IUpLoadProps {
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
mediaType?: MediaTypeEnum;
|
|
30
28
|
}
|
package/es/Upload/util.d.ts
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import type { UploadFile } from "antd/es/upload/interface";
|
|
2
2
|
export declare const getFileExt: (file: UploadFile) => string;
|
|
3
|
-
export declare const checkFileType: (
|
|
4
|
-
|
|
5
|
-
exFiles?: string[]
|
|
6
|
-
) => boolean;
|
|
7
|
-
export declare const checkFileSize: (
|
|
8
|
-
file: UploadFile,
|
|
9
|
-
maxSize?: number
|
|
10
|
-
) => boolean;
|
|
3
|
+
export declare const checkFileType: (file: UploadFile, exFiles?: string[]) => boolean;
|
|
4
|
+
export declare const checkFileSize: (file: UploadFile, maxSize?: number) => boolean;
|
|
11
5
|
export declare const fileToBase64: (file: any) => Promise<unknown>;
|
package/es/Upload/util.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// welcome to hoo hoo hoo
|
|
2
|
-
import _lastIndexOfInstanceProperty from
|
|
3
|
-
import _indexOfInstanceProperty from
|
|
4
|
-
import _Promise from
|
|
2
|
+
import _lastIndexOfInstanceProperty from '@babel/runtime-corejs3/core-js/instance/last-index-of';
|
|
3
|
+
import _indexOfInstanceProperty from '@babel/runtime-corejs3/core-js/instance/index-of';
|
|
4
|
+
import _Promise from '@babel/runtime-corejs3/core-js/promise';
|
|
5
5
|
|
|
6
6
|
var getFileExt = function getFileExt(file) {
|
|
7
7
|
var name = file.name;
|
|
@@ -9,14 +9,12 @@ var getFileExt = function getFileExt(file) {
|
|
|
9
9
|
return name.substring(index + 1).toUpperCase();
|
|
10
10
|
};
|
|
11
11
|
var checkFileType = function checkFileType(file) {
|
|
12
|
-
var exFiles =
|
|
13
|
-
arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
12
|
+
var exFiles = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
14
13
|
var exName = getFileExt(file);
|
|
15
14
|
return _indexOfInstanceProperty(exFiles).call(exFiles, exName) !== -1;
|
|
16
15
|
};
|
|
17
16
|
var checkFileSize = function checkFileSize(file) {
|
|
18
|
-
var maxSize =
|
|
19
|
-
arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
17
|
+
var maxSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
20
18
|
var _file$size = file.size,
|
|
21
19
|
size = _file$size === void 0 ? 0 : _file$size;
|
|
22
20
|
return size <= maxSize;
|
|
@@ -24,16 +22,10 @@ var checkFileSize = function checkFileSize(file) {
|
|
|
24
22
|
var fileToBase64 = function fileToBase64(file) {
|
|
25
23
|
return new _Promise(function (resolve) {
|
|
26
24
|
var reader = new FileReader();
|
|
27
|
-
reader.readAsDataURL(
|
|
28
|
-
file === null || file === void 0 ? void 0 : file.originFileObj
|
|
29
|
-
);
|
|
25
|
+
reader.readAsDataURL(file === null || file === void 0 ? void 0 : file.originFileObj);
|
|
30
26
|
reader.onload = function (e) {
|
|
31
27
|
var _e$target;
|
|
32
|
-
resolve(
|
|
33
|
-
(_e$target = e.target) === null || _e$target === void 0
|
|
34
|
-
? void 0
|
|
35
|
-
: _e$target.result
|
|
36
|
-
);
|
|
28
|
+
resolve((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.result);
|
|
37
29
|
};
|
|
38
30
|
});
|
|
39
31
|
};
|
package/es/config.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// welcome to hoo hoo hoo
|
|
2
|
-
import _asyncToGenerator from
|
|
3
|
-
import _regeneratorRuntime from
|
|
4
|
-
import moment from
|
|
5
|
-
import { fileToBase64 } from
|
|
2
|
+
import _asyncToGenerator from '@babel/runtime-corejs3/helpers/asyncToGenerator';
|
|
3
|
+
import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
|
|
4
|
+
import moment from 'moment';
|
|
5
|
+
import { fileToBase64 } from './Upload/util.js';
|
|
6
6
|
|
|
7
7
|
var baseConfig = {
|
|
8
8
|
fieldNames: {
|
|
9
9
|
label: "label",
|
|
10
|
-
value: "value"
|
|
10
|
+
value: "value"
|
|
11
11
|
},
|
|
12
12
|
valueCheckMap: {
|
|
13
13
|
checked: true,
|
|
14
|
-
noChecked: false
|
|
14
|
+
noChecked: false
|
|
15
15
|
},
|
|
16
16
|
valueSwitchMap: {
|
|
17
17
|
open: true,
|
|
18
|
-
close: false
|
|
18
|
+
close: false
|
|
19
19
|
},
|
|
20
20
|
valueRangePickerValueMap: {
|
|
21
21
|
start: function start(name) {
|
|
@@ -23,44 +23,41 @@ var baseConfig = {
|
|
|
23
23
|
},
|
|
24
24
|
end: function end(name) {
|
|
25
25
|
return "".concat(name, "EndTime");
|
|
26
|
-
}
|
|
26
|
+
}
|
|
27
27
|
},
|
|
28
28
|
dateRanges: {
|
|
29
29
|
最近三天: [moment().subtract(2, "days").startOf("days"), moment()],
|
|
30
30
|
最近七天: [moment().subtract(6, "days").startOf("days"), moment()],
|
|
31
|
-
最近三十天: [moment().subtract(29, "days").startOf("days"), moment()]
|
|
31
|
+
最近三十天: [moment().subtract(29, "days").startOf("days"), moment()]
|
|
32
32
|
},
|
|
33
33
|
uploadProps: {
|
|
34
34
|
exFiles: ["JPG", "PNG", "JPEG", "GIF"],
|
|
35
|
-
request:
|
|
36
|
-
var _request = _asyncToGenerator(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}, _callee);
|
|
55
|
-
})
|
|
56
|
-
);
|
|
35
|
+
request: function () {
|
|
36
|
+
var _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(file) {
|
|
37
|
+
var url;
|
|
38
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
39
|
+
while (1) switch (_context.prev = _context.next) {
|
|
40
|
+
case 0:
|
|
41
|
+
_context.next = 2;
|
|
42
|
+
return fileToBase64(file);
|
|
43
|
+
case 2:
|
|
44
|
+
url = _context.sent;
|
|
45
|
+
return _context.abrupt("return", {
|
|
46
|
+
url: url
|
|
47
|
+
});
|
|
48
|
+
case 4:
|
|
49
|
+
case "end":
|
|
50
|
+
return _context.stop();
|
|
51
|
+
}
|
|
52
|
+
}, _callee);
|
|
53
|
+
}));
|
|
57
54
|
function request(_x) {
|
|
58
55
|
return _request.apply(this, arguments);
|
|
59
56
|
}
|
|
60
57
|
return request;
|
|
61
|
-
}
|
|
62
|
-
maxSize: 1024 * 1024 * 1.8
|
|
63
|
-
}
|
|
58
|
+
}(),
|
|
59
|
+
maxSize: 1024 * 1024 * 1.8
|
|
60
|
+
}
|
|
64
61
|
};
|
|
65
62
|
|
|
66
63
|
export { baseConfig };
|
package/es/hooks/index.d.ts
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
1
|
import type { SelectProps } from "antd";
|
|
2
2
|
import type { IFormConfigContextProps } from "../Form/modal";
|
|
3
3
|
interface UseChangeOptionsParams {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
options?: Record<string, any>[];
|
|
5
|
+
fieldNames?: SelectProps["fieldNames"];
|
|
6
6
|
}
|
|
7
|
-
export declare const useChangeOptions: ({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
| {
|
|
12
|
-
label: any;
|
|
13
|
-
value: any;
|
|
14
|
-
}[]
|
|
15
|
-
| undefined;
|
|
7
|
+
export declare const useChangeOptions: ({ options, fieldNames, }: UseChangeOptionsParams) => {
|
|
8
|
+
label: any;
|
|
9
|
+
value: any;
|
|
10
|
+
}[] | undefined;
|
|
16
11
|
export declare const useClassName: (className: string | string[]) => string;
|
|
17
|
-
export declare const useMatchConfigProps: (
|
|
18
|
-
matchProps: IFormConfigContextProps
|
|
19
|
-
) => IFormConfigContextProps;
|
|
12
|
+
export declare const useMatchConfigProps: (matchProps: IFormConfigContextProps) => IFormConfigContextProps;
|
|
20
13
|
export {};
|
package/es/hooks/index.js
CHANGED
|
@@ -1,136 +1,61 @@
|
|
|
1
1
|
// welcome to hoo hoo hoo
|
|
2
|
-
import _typeof from
|
|
3
|
-
import _defineProperty from
|
|
4
|
-
import _objectWithoutProperties from
|
|
5
|
-
import _mapInstanceProperty from
|
|
6
|
-
import _Array$isArray from
|
|
7
|
-
import _concatInstanceProperty from
|
|
8
|
-
import _Object$keys from
|
|
9
|
-
import _forEachInstanceProperty from
|
|
10
|
-
import _Symbol$toPrimitive from
|
|
11
|
-
import _Object$getOwnPropertySymbols from
|
|
12
|
-
import _filterInstanceProperty from
|
|
13
|
-
import _Object$getOwnPropertyDescriptor from
|
|
14
|
-
import _Object$getOwnPropertyDescriptors from
|
|
15
|
-
import _Object$defineProperties from
|
|
16
|
-
import _Object$defineProperty from
|
|
17
|
-
import { useMemo, useContext } from
|
|
18
|
-
import { ConfigContext } from
|
|
19
|
-
import { useFormConfigContext } from
|
|
2
|
+
import _typeof from '@babel/runtime-corejs3/helpers/typeof';
|
|
3
|
+
import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
|
|
4
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
5
|
+
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js/instance/map';
|
|
6
|
+
import _Array$isArray from '@babel/runtime-corejs3/core-js/array/is-array';
|
|
7
|
+
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js/instance/concat';
|
|
8
|
+
import _Object$keys from '@babel/runtime-corejs3/core-js/object/keys';
|
|
9
|
+
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js/instance/for-each';
|
|
10
|
+
import _Symbol$toPrimitive from '@babel/runtime-corejs3/core-js/symbol/to-primitive';
|
|
11
|
+
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js/object/get-own-property-symbols';
|
|
12
|
+
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js/instance/filter';
|
|
13
|
+
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptor';
|
|
14
|
+
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js/object/get-own-property-descriptors';
|
|
15
|
+
import _Object$defineProperties from '@babel/runtime-corejs3/core-js/object/define-properties';
|
|
16
|
+
import _Object$defineProperty from '@babel/runtime-corejs3/core-js/object/define-property';
|
|
17
|
+
import { useMemo, useContext } from 'react';
|
|
18
|
+
import { ConfigContext } from 'antd/es/config-provider';
|
|
19
|
+
import { useFormConfigContext } from '../Form/Context/FormConfigProvider.js';
|
|
20
20
|
|
|
21
|
-
function ownKeys(object, enumerableOnly) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
enumerableOnly &&
|
|
26
|
-
(symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) {
|
|
27
|
-
return _Object$getOwnPropertyDescriptor(object, sym).enumerable;
|
|
28
|
-
})),
|
|
29
|
-
keys.push.apply(keys, symbols);
|
|
30
|
-
}
|
|
31
|
-
return keys;
|
|
32
|
-
}
|
|
33
|
-
function _objectSpread(target) {
|
|
34
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
35
|
-
var _context4, _context5;
|
|
36
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
37
|
-
i % 2
|
|
38
|
-
? _forEachInstanceProperty(
|
|
39
|
-
(_context4 = ownKeys(Object(source), !0))
|
|
40
|
-
).call(_context4, function (key) {
|
|
41
|
-
_defineProperty(target, key, source[key]);
|
|
42
|
-
})
|
|
43
|
-
: _Object$getOwnPropertyDescriptors
|
|
44
|
-
? _Object$defineProperties(
|
|
45
|
-
target,
|
|
46
|
-
_Object$getOwnPropertyDescriptors(source)
|
|
47
|
-
)
|
|
48
|
-
: _forEachInstanceProperty((_context5 = ownKeys(Object(source)))).call(
|
|
49
|
-
_context5,
|
|
50
|
-
function (key) {
|
|
51
|
-
_Object$defineProperty(
|
|
52
|
-
target,
|
|
53
|
-
key,
|
|
54
|
-
_Object$getOwnPropertyDescriptor(source, key)
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
return target;
|
|
60
|
-
}
|
|
61
|
-
function _toPropertyKey(arg) {
|
|
62
|
-
var key = _toPrimitive(arg, "string");
|
|
63
|
-
return _typeof(key) === "symbol" ? key : String(key);
|
|
64
|
-
}
|
|
65
|
-
function _toPrimitive(input, hint) {
|
|
66
|
-
if (_typeof(input) !== "object" || input === null) return input;
|
|
67
|
-
var prim = input[_Symbol$toPrimitive];
|
|
68
|
-
if (prim !== undefined) {
|
|
69
|
-
var res = prim.call(input, hint || "default");
|
|
70
|
-
if (_typeof(res) !== "object") return res;
|
|
71
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
72
|
-
}
|
|
73
|
-
return (hint === "string" ? String : Number)(input);
|
|
74
|
-
}
|
|
21
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
22
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context4, _context5; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context4 = ownKeys(Object(source), !0)).call(_context4, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context5 = ownKeys(Object(source))).call(_context5, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
24
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[_Symbol$toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
75
25
|
var useChangeOptions = function useChangeOptions(_ref) {
|
|
76
26
|
var options = _ref.options,
|
|
77
27
|
_ref$fieldNames = _ref.fieldNames,
|
|
78
28
|
fieldNames = _ref$fieldNames === void 0 ? {} : _ref$fieldNames;
|
|
79
|
-
return useMemo(
|
|
80
|
-
function () {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
_toPropertyKey
|
|
96
|
-
)
|
|
97
|
-
);
|
|
98
|
-
return _objectSpread(
|
|
99
|
-
_objectSpread({}, oItem),
|
|
100
|
-
{},
|
|
101
|
-
{
|
|
102
|
-
label: relLabel,
|
|
103
|
-
value: relVal,
|
|
104
|
-
}
|
|
105
|
-
);
|
|
106
|
-
});
|
|
107
|
-
},
|
|
108
|
-
[options]
|
|
109
|
-
);
|
|
29
|
+
return useMemo(function () {
|
|
30
|
+
return options === null || options === void 0 ? void 0 : _mapInstanceProperty(options).call(options, function (item) {
|
|
31
|
+
var _context;
|
|
32
|
+
var _fieldNames$label = fieldNames.label,
|
|
33
|
+
label = _fieldNames$label === void 0 ? "" : _fieldNames$label,
|
|
34
|
+
_fieldNames$value = fieldNames.value,
|
|
35
|
+
value = _fieldNames$value === void 0 ? "" : _fieldNames$value;
|
|
36
|
+
var relLabel = item[label],
|
|
37
|
+
relVal = item[value],
|
|
38
|
+
oItem = _objectWithoutProperties(item, _mapInstanceProperty(_context = [label, value]).call(_context, _toPropertyKey));
|
|
39
|
+
return _objectSpread(_objectSpread({}, oItem), {}, {
|
|
40
|
+
label: relLabel,
|
|
41
|
+
value: relVal
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
}, [options]);
|
|
110
45
|
};
|
|
111
46
|
var useClassName = function useClassName(className) {
|
|
112
47
|
var config = useContext(ConfigContext);
|
|
113
|
-
return useMemo(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
var
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
return classNames.join(" ");
|
|
127
|
-
}
|
|
128
|
-
return _concatInstanceProperty(
|
|
129
|
-
(_context3 = "".concat(config.getPrefixCls(), "-"))
|
|
130
|
-
).call(_context3, className);
|
|
131
|
-
},
|
|
132
|
-
[className]
|
|
133
|
-
);
|
|
48
|
+
return useMemo(function () {
|
|
49
|
+
var _context3;
|
|
50
|
+
if (_Array$isArray(className)) {
|
|
51
|
+
var classNames = _mapInstanceProperty(className).call(className, function (item) {
|
|
52
|
+
var _context2;
|
|
53
|
+
return _concatInstanceProperty(_context2 = "".concat(config.getPrefixCls(), "-")).call(_context2, item);
|
|
54
|
+
});
|
|
55
|
+
return classNames.join(" ");
|
|
56
|
+
}
|
|
57
|
+
return _concatInstanceProperty(_context3 = "".concat(config.getPrefixCls(), "-")).call(_context3, className);
|
|
58
|
+
}, [className]);
|
|
134
59
|
};
|
|
135
60
|
var useMatchConfigProps = function useMatchConfigProps(matchProps) {
|
|
136
61
|
var globalConfig = useFormConfigContext();
|