@hw-component/form 0.0.1-bate → 0.0.1-beta
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 +24 -16
- package/es/CheckboxGroup/hooks.d.ts +9 -3
- package/es/CheckboxGroup/hooks.js +115 -64
- package/es/CheckboxGroup/index.d.ts +6 -1
- package/es/CheckboxGroup/index.js +117 -56
- package/es/CheckboxGroup/modal.d.ts +9 -8
- package/es/Form/Context/FormConfigProvider.js +64 -19
- package/es/Form/Context/index.d.ts +4 -1
- package/es/Form/Context/index.js +3 -3
- package/es/Form/FormItem/BasicItem.js +80 -42
- package/es/Form/FormItem/Helper.d.ts +1 -1
- package/es/Form/FormItem/Helper.js +17 -9
- package/es/Form/FormItem/RegularFormItem.js +11 -8
- package/es/Form/FormItem/UpFormItem.d.ts +6 -1
- package/es/Form/FormItem/UpFormItem.js +27 -17
- package/es/Form/FormItem/hooks.d.ts +21 -4
- package/es/Form/FormItem/hooks.js +12 -9
- package/es/Form/FormItem/index.js +5 -5
- package/es/Form/HFormConnect.d.ts +9 -1
- package/es/Form/HFormConnect.js +94 -26
- package/es/Form/InitSet.d.ts +1 -1
- package/es/Form/InitSet.js +5 -5
- package/es/Form/Label.d.ts +4 -4
- package/es/Form/Label.js +36 -19
- package/es/Form/config.d.ts +100 -22
- package/es/Form/config.js +19 -19
- package/es/Form/hooks/index.d.ts +12 -5
- package/es/Form/hooks/index.js +65 -49
- package/es/Form/hooks/useHForm.js +233 -95
- package/es/Form/hooks/useInitConfigData.d.ts +4 -1
- package/es/Form/hooks/useInitConfigData.js +143 -61
- package/es/Form/index.d.ts +11 -1
- package/es/Form/index.js +71 -40
- package/es/Form/modal.d.ts +92 -51
- package/es/Input/ButtonInput.js +73 -51
- package/es/Input/InputNumber.js +21 -12
- package/es/Input/SelectInput.d.ts +16 -4
- package/es/Input/SelectInput.js +113 -56
- 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 +15 -11
- package/es/PageHandler/ErrorComponent.js +47 -25
- package/es/PageHandler/LoadingComponent.js +17 -13
- package/es/PageHandler/index.js +7 -7
- package/es/PageHandler/modal.d.ts +4 -4
- package/es/RadioGroup/index.d.ts +12 -5
- package/es/RadioGroup/index.js +46 -33
- package/es/Select/components/AllSelect.d.ts +1 -1
- package/es/Select/components/AllSelect.js +40 -18
- package/es/Select/components/CheckBoxOption.d.ts +6 -3
- package/es/Select/components/CheckBoxOption.js +12 -7
- package/es/Select/components/DropdownComponent.d.ts +4 -4
- package/es/Select/components/DropdownComponent.js +30 -17
- package/es/Select/components/NoFindItem.d.ts +1 -1
- package/es/Select/components/NoFindItem.js +11 -7
- package/es/Select/components/NotFoundContent.d.ts +2 -2
- package/es/Select/components/NotFoundContent.js +49 -27
- package/es/Select/defaultConfig.d.ts +1 -1
- package/es/Select/defaultConfig.js +20 -16
- package/es/Select/hooks/changeHooks.d.ts +2 -2
- package/es/Select/hooks/changeHooks.js +147 -71
- package/es/Select/hooks/norHooks.d.ts +27 -9
- package/es/Select/hooks/norHooks.js +51 -39
- package/es/Select/index.d.ts +22 -1
- package/es/Select/index.js +124 -65
- package/es/Select/modal.d.ts +15 -15
- package/es/Select/utils.js +60 -15
- package/es/Submit/index.d.ts +9 -3
- package/es/Submit/index.js +18 -13
- package/es/Switch/index.d.ts +4 -4
- package/es/Switch/index.js +46 -20
- package/es/TDPicker/RangePicker.d.ts +8 -3
- package/es/TDPicker/RangePicker.js +138 -62
- package/es/TDPicker/TimePicker.d.ts +6 -1
- package/es/TDPicker/TimePicker.js +19 -13
- package/es/TDPicker/hooks.d.ts +42 -22
- package/es/TDPicker/hooks.js +106 -72
- package/es/TDPicker/index.d.ts +7 -1
- package/es/TDPicker/index.js +20 -14
- package/es/TDPicker/modal.d.ts +21 -16
- package/es/Upload/Btn.d.ts +5 -1
- package/es/Upload/Btn.js +35 -19
- package/es/Upload/MediaTypeEle/TypeEle.d.ts +10 -5
- package/es/Upload/MediaTypeEle/TypeEle.js +31 -23
- package/es/Upload/MediaTypeEle/index.d.ts +5 -1
- package/es/Upload/MediaTypeEle/index.js +21 -18
- package/es/Upload/Preview/index.d.ts +5 -1
- package/es/Upload/Preview/index.js +17 -13
- package/es/Upload/UrlUpload/index.d.ts +7 -1
- package/es/Upload/UrlUpload/index.js +72 -51
- package/es/Upload/enums.d.ts +3 -3
- package/es/Upload/enums.js +3 -3
- package/es/Upload/hooks/change.d.ts +8 -1
- package/es/Upload/hooks/change.js +115 -58
- package/es/Upload/hooks/customRequest.d.ts +5 -1
- package/es/Upload/hooks/customRequest.js +63 -46
- package/es/Upload/hooks/propsMaker.d.ts +5 -1
- package/es/Upload/hooks/propsMaker.js +52 -13
- package/es/Upload/index.d.ts +3 -1
- package/es/Upload/index.js +131 -61
- package/es/Upload/modal.d.ts +17 -15
- package/es/Upload/util.d.ts +8 -2
- package/es/Upload/util.js +15 -7
- package/es/config.js +34 -31
- package/es/hooks/index.d.ts +14 -7
- package/es/hooks/index.js +124 -49
- package/es/index.d.ts +98 -16
- package/es/index.js +22 -5
- package/es/modal.d.ts +6 -6
- package/lib/CheckboxGroup/CheckBox/index.js +26 -18
- package/lib/CheckboxGroup/hooks.d.ts +9 -3
- package/lib/CheckboxGroup/hooks.js +116 -65
- package/lib/CheckboxGroup/index.d.ts +6 -1
- package/lib/CheckboxGroup/index.js +119 -58
- package/lib/CheckboxGroup/modal.d.ts +9 -8
- package/lib/Form/Context/FormConfigProvider.js +66 -21
- package/lib/Form/Context/index.d.ts +4 -1
- package/lib/Form/Context/index.js +4 -4
- package/lib/Form/FormItem/BasicItem.js +82 -44
- package/lib/Form/FormItem/Helper.d.ts +1 -1
- package/lib/Form/FormItem/Helper.js +19 -11
- package/lib/Form/FormItem/RegularFormItem.js +13 -10
- package/lib/Form/FormItem/UpFormItem.d.ts +6 -1
- package/lib/Form/FormItem/UpFormItem.js +29 -19
- package/lib/Form/FormItem/hooks.d.ts +21 -4
- package/lib/Form/FormItem/hooks.js +13 -10
- package/lib/Form/FormItem/index.js +7 -7
- package/lib/Form/HFormConnect.d.ts +9 -1
- package/lib/Form/HFormConnect.js +96 -28
- package/lib/Form/InitSet.d.ts +1 -1
- package/lib/Form/InitSet.js +7 -7
- package/lib/Form/Label.d.ts +4 -4
- package/lib/Form/Label.js +41 -21
- package/lib/Form/config.d.ts +100 -22
- package/lib/Form/config.js +21 -21
- package/lib/Form/hooks/index.d.ts +12 -5
- package/lib/Form/hooks/index.js +66 -50
- package/lib/Form/hooks/useHForm.js +235 -97
- package/lib/Form/hooks/useInitConfigData.d.ts +4 -1
- package/lib/Form/hooks/useInitConfigData.js +144 -63
- package/lib/Form/index.d.ts +11 -1
- package/lib/Form/index.js +73 -42
- package/lib/Form/modal.d.ts +92 -51
- package/lib/Input/ButtonInput.js +75 -53
- package/lib/Input/InputNumber.js +23 -14
- package/lib/Input/SelectInput.d.ts +16 -4
- package/lib/Input/SelectInput.js +125 -60
- 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 +15 -11
- package/lib/PageHandler/ErrorComponent.js +49 -27
- package/lib/PageHandler/LoadingComponent.js +19 -15
- package/lib/PageHandler/index.js +9 -9
- package/lib/PageHandler/modal.d.ts +4 -4
- package/lib/RadioGroup/index.d.ts +12 -5
- package/lib/RadioGroup/index.js +48 -35
- package/lib/Select/components/AllSelect.d.ts +1 -1
- package/lib/Select/components/AllSelect.js +42 -20
- package/lib/Select/components/CheckBoxOption.d.ts +6 -3
- package/lib/Select/components/CheckBoxOption.js +14 -9
- package/lib/Select/components/DropdownComponent.d.ts +4 -4
- package/lib/Select/components/DropdownComponent.js +32 -19
- package/lib/Select/components/NoFindItem.d.ts +1 -1
- package/lib/Select/components/NoFindItem.js +13 -9
- package/lib/Select/components/NotFoundContent.d.ts +2 -2
- package/lib/Select/components/NotFoundContent.js +51 -29
- package/lib/Select/defaultConfig.d.ts +1 -1
- package/lib/Select/defaultConfig.js +21 -17
- package/lib/Select/hooks/changeHooks.d.ts +2 -2
- package/lib/Select/hooks/changeHooks.js +148 -72
- package/lib/Select/hooks/norHooks.d.ts +27 -9
- package/lib/Select/hooks/norHooks.js +52 -40
- package/lib/Select/index.d.ts +22 -1
- package/lib/Select/index.js +128 -67
- package/lib/Select/modal.d.ts +15 -15
- package/lib/Select/utils.js +61 -16
- package/lib/Submit/index.d.ts +9 -3
- package/lib/Submit/index.js +20 -15
- package/lib/Switch/index.d.ts +4 -4
- package/lib/Switch/index.js +48 -22
- package/lib/TDPicker/RangePicker.d.ts +8 -3
- package/lib/TDPicker/RangePicker.js +136 -64
- package/lib/TDPicker/TimePicker.d.ts +6 -1
- package/lib/TDPicker/TimePicker.js +21 -15
- package/lib/TDPicker/hooks.d.ts +42 -22
- package/lib/TDPicker/hooks.js +98 -72
- package/lib/TDPicker/index.d.ts +7 -1
- package/lib/TDPicker/index.js +22 -16
- package/lib/TDPicker/modal.d.ts +21 -16
- package/lib/Upload/Btn.d.ts +5 -1
- package/lib/Upload/Btn.js +37 -21
- package/lib/Upload/MediaTypeEle/TypeEle.d.ts +10 -5
- package/lib/Upload/MediaTypeEle/TypeEle.js +33 -25
- package/lib/Upload/MediaTypeEle/index.d.ts +5 -1
- package/lib/Upload/MediaTypeEle/index.js +23 -20
- package/lib/Upload/Preview/index.d.ts +5 -1
- package/lib/Upload/Preview/index.js +19 -15
- package/lib/Upload/UrlUpload/index.d.ts +7 -1
- package/lib/Upload/UrlUpload/index.js +74 -53
- package/lib/Upload/enums.d.ts +3 -3
- package/lib/Upload/enums.js +4 -4
- package/lib/Upload/hooks/change.d.ts +8 -1
- package/lib/Upload/hooks/change.js +116 -59
- package/lib/Upload/hooks/customRequest.d.ts +5 -1
- package/lib/Upload/hooks/customRequest.js +64 -47
- package/lib/Upload/hooks/propsMaker.d.ts +5 -1
- package/lib/Upload/hooks/propsMaker.js +55 -15
- package/lib/Upload/index.d.ts +3 -1
- package/lib/Upload/index.js +133 -63
- package/lib/Upload/modal.d.ts +17 -15
- package/lib/Upload/util.d.ts +8 -2
- package/lib/Upload/util.js +16 -8
- package/lib/config.js +35 -32
- package/lib/hooks/index.d.ts +14 -7
- package/lib/hooks/index.js +125 -50
- package/lib/index.d.ts +98 -16
- package/lib/index.js +5 -5
- package/lib/modal.d.ts +6 -6
- package/package.json +2 -2
- package/src/components/CheckboxGroup/index.tsx +2 -2
- package/src/components/Form/FormItem/Helper.tsx +3 -4
- package/src/components/Form/HFormConnect.tsx +6 -2
- package/src/components/Form/hooks/useHForm.ts +59 -10
- package/src/components/Form/modal.ts +12 -8
- package/src/components/TDPicker/RangePicker.tsx +7 -5
- package/src/components/TDPicker/modal.ts +1 -0
- package/src/pages/Form/index.tsx +2 -2
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
// welcome to hoo hoo hoo
|
|
2
|
-
import _concatInstanceProperty from
|
|
3
|
-
import { Space, Checkbox } from
|
|
4
|
-
import { itemOpProvider } from
|
|
5
|
-
import { useClassName } from
|
|
6
|
-
import React from
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import { Space, Checkbox } from "antd";
|
|
4
|
+
import { itemOpProvider } from "../utils.js";
|
|
5
|
+
import { useClassName } from "../../hooks/index.js";
|
|
6
|
+
import React from "react";
|
|
7
7
|
|
|
8
8
|
var useRootClassName = function useRootClassName(checked) {
|
|
9
9
|
var _context;
|
|
10
10
|
var norClassNames = ["select-item", "select-item-option"];
|
|
11
|
-
return checked
|
|
11
|
+
return checked
|
|
12
|
+
? _concatInstanceProperty((_context = [])).call(_context, norClassNames, [
|
|
13
|
+
"select-item-option-selected",
|
|
14
|
+
])
|
|
15
|
+
: norClassNames;
|
|
12
16
|
};
|
|
13
17
|
var Index = function Index(_ref) {
|
|
14
18
|
var allSelect = _ref.allSelect,
|
|
@@ -20,30 +24,48 @@ var Index = function Index(_ref) {
|
|
|
20
24
|
_ref$fieldNames = _ref.fieldNames,
|
|
21
25
|
fieldNames = _ref$fieldNames === void 0 ? {} : _ref$fieldNames,
|
|
22
26
|
children = _ref.children;
|
|
23
|
-
var opLen =
|
|
24
|
-
|
|
27
|
+
var opLen =
|
|
28
|
+
(options === null || options === void 0 ? void 0 : options.length) || 0;
|
|
29
|
+
var checked =
|
|
30
|
+
(value === null || value === void 0 ? void 0 : value.length) >= opLen;
|
|
25
31
|
var classNames = useRootClassName(checked);
|
|
26
32
|
var optionsClassName = useClassName(classNames);
|
|
27
33
|
var allCheckBox = useClassName("hw-all-check-box");
|
|
28
34
|
var change = function change() {
|
|
29
35
|
if (!checked) {
|
|
30
36
|
var subItemOps = itemOpProvider(options, fieldNames);
|
|
31
|
-
onChange === null || onChange === void 0
|
|
37
|
+
onChange === null || onChange === void 0
|
|
38
|
+
? void 0
|
|
39
|
+
: onChange(options, subItemOps);
|
|
32
40
|
return;
|
|
33
41
|
}
|
|
34
42
|
onChange === null || onChange === void 0 ? void 0 : onChange([], []);
|
|
35
43
|
};
|
|
36
44
|
if (!allSelect || mode !== "multiple" || serviceSearch) {
|
|
37
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
45
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
|
|
38
46
|
}
|
|
39
|
-
return /*#__PURE__*/React.createElement(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
return /*#__PURE__*/ React.createElement(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
className: allCheckBox,
|
|
51
|
+
},
|
|
52
|
+
/*#__PURE__*/ React.createElement(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
className: optionsClassName,
|
|
56
|
+
onClick: change,
|
|
57
|
+
},
|
|
58
|
+
/*#__PURE__*/ React.createElement(
|
|
59
|
+
Space,
|
|
60
|
+
null,
|
|
61
|
+
/*#__PURE__*/ React.createElement(Checkbox, {
|
|
62
|
+
checked: checked,
|
|
63
|
+
}),
|
|
64
|
+
"\u5168\u90E8"
|
|
65
|
+
)
|
|
66
|
+
),
|
|
67
|
+
children
|
|
68
|
+
);
|
|
47
69
|
};
|
|
48
70
|
|
|
49
71
|
export { Index as default };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface ICheckBoxOptionProps {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
label?: React.ReactNode;
|
|
4
|
+
checked: boolean;
|
|
5
5
|
}
|
|
6
|
-
declare const _default: ({
|
|
6
|
+
declare const _default: ({
|
|
7
|
+
label,
|
|
8
|
+
checked,
|
|
9
|
+
}: ICheckBoxOptionProps) => JSX.Element;
|
|
7
10
|
export default _default;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
// welcome to hoo hoo hoo
|
|
2
|
-
import { Space, Checkbox } from
|
|
3
|
-
import React from
|
|
2
|
+
import { Space, Checkbox } from "antd";
|
|
3
|
+
import React from "react";
|
|
4
4
|
|
|
5
|
-
var CheckBoxOption =
|
|
5
|
+
var CheckBoxOption = function (_ref) {
|
|
6
6
|
var label = _ref.label,
|
|
7
7
|
checked = _ref.checked;
|
|
8
|
-
return /*#__PURE__*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
return /*#__PURE__*/ React.createElement(
|
|
9
|
+
Space,
|
|
10
|
+
null,
|
|
11
|
+
/*#__PURE__*/ React.createElement(Checkbox, {
|
|
12
|
+
checked: checked,
|
|
13
|
+
}),
|
|
14
|
+
label
|
|
15
|
+
);
|
|
16
|
+
};
|
|
12
17
|
|
|
13
18
|
export { CheckBoxOption as default };
|
|
14
19
|
// powered by hdj
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface IProps {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
loading?: boolean;
|
|
4
|
+
options?: any[];
|
|
5
|
+
error?: Error;
|
|
6
|
+
reload: VoidFunction;
|
|
7
7
|
}
|
|
8
8
|
declare const Index: React.FC<IProps>;
|
|
9
9
|
export default Index;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// welcome to hoo hoo hoo
|
|
2
|
-
import React from
|
|
3
|
-
import { Typography, Row, Space, Spin } from
|
|
4
|
-
import NotFoundContent from
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Typography, Row, Space, Spin } from "antd";
|
|
4
|
+
import NotFoundContent from "./NotFoundContent.js";
|
|
5
5
|
|
|
6
6
|
var Text = Typography.Text;
|
|
7
7
|
var Index = function Index(_ref) {
|
|
@@ -13,26 +13,39 @@ var Index = function Index(_ref) {
|
|
|
13
13
|
children = _ref.children;
|
|
14
14
|
var len = options === null || options === void 0 ? void 0 : options.length;
|
|
15
15
|
if (loading && len === 0) {
|
|
16
|
-
return /*#__PURE__*/React.createElement(
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
return /*#__PURE__*/ React.createElement(
|
|
17
|
+
Row,
|
|
18
|
+
{
|
|
19
|
+
style: {
|
|
20
|
+
height: 125,
|
|
21
|
+
},
|
|
22
|
+
justify: "center",
|
|
23
|
+
align: "middle",
|
|
19
24
|
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
/*#__PURE__*/ React.createElement(
|
|
26
|
+
Space,
|
|
27
|
+
{
|
|
28
|
+
direction: "vertical",
|
|
29
|
+
align: "center",
|
|
30
|
+
},
|
|
31
|
+
/*#__PURE__*/ React.createElement(Spin, null),
|
|
32
|
+
/*#__PURE__*/ React.createElement(
|
|
33
|
+
Text,
|
|
34
|
+
{
|
|
35
|
+
type: "secondary",
|
|
36
|
+
},
|
|
37
|
+
"\u62FC\u547D\u52A0\u8F7D\u4E2D..."
|
|
38
|
+
)
|
|
39
|
+
)
|
|
40
|
+
);
|
|
28
41
|
}
|
|
29
42
|
if (error && len === 0) {
|
|
30
|
-
return /*#__PURE__*/React.createElement(NotFoundContent, {
|
|
43
|
+
return /*#__PURE__*/ React.createElement(NotFoundContent, {
|
|
31
44
|
error: error,
|
|
32
|
-
reload: reload
|
|
45
|
+
reload: reload,
|
|
33
46
|
});
|
|
34
47
|
}
|
|
35
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, children);
|
|
48
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
|
|
36
49
|
};
|
|
37
50
|
|
|
38
51
|
export { Index as default };
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
// welcome to hoo hoo hoo
|
|
2
|
-
import React from
|
|
3
|
-
import { Typography } from
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Typography } from "antd";
|
|
4
4
|
|
|
5
|
-
var NoFindItem =
|
|
5
|
+
var NoFindItem = function (_ref) {
|
|
6
6
|
var label = _ref.label;
|
|
7
|
-
return /*#__PURE__*/React.createElement(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
return /*#__PURE__*/ React.createElement(
|
|
8
|
+
Typography.Text,
|
|
9
|
+
{
|
|
10
|
+
type: "danger",
|
|
11
|
+
},
|
|
12
|
+
label
|
|
13
|
+
);
|
|
14
|
+
};
|
|
11
15
|
|
|
12
16
|
export { NoFindItem as default };
|
|
13
17
|
// powered by hdj
|
|
@@ -1,38 +1,60 @@
|
|
|
1
1
|
// welcome to hoo hoo hoo
|
|
2
|
-
import React from
|
|
3
|
-
import { Typography, Row, Space, Button, Empty } from
|
|
4
|
-
import { ExclamationCircleOutlined } from
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Typography, Row, Space, Button, Empty } from "antd";
|
|
4
|
+
import { ExclamationCircleOutlined } from "@ant-design/icons";
|
|
5
5
|
|
|
6
6
|
var Text = Typography.Text;
|
|
7
|
-
var NotFoundContent =
|
|
7
|
+
var NotFoundContent = function (_ref) {
|
|
8
8
|
var error = _ref.error,
|
|
9
9
|
reload = _ref.reload;
|
|
10
10
|
if (error) {
|
|
11
|
-
return /*#__PURE__*/React.createElement(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
11
|
+
return /*#__PURE__*/ React.createElement(
|
|
12
|
+
Row,
|
|
13
|
+
{
|
|
14
|
+
justify: "center",
|
|
15
|
+
align: "middle",
|
|
16
|
+
style: {
|
|
17
|
+
height: 125,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
/*#__PURE__*/ React.createElement(
|
|
21
|
+
Space,
|
|
22
|
+
{
|
|
23
|
+
align: "center",
|
|
24
|
+
direction: "vertical",
|
|
25
|
+
},
|
|
26
|
+
/*#__PURE__*/ React.createElement(
|
|
27
|
+
Text,
|
|
28
|
+
{
|
|
29
|
+
type: "danger",
|
|
30
|
+
},
|
|
31
|
+
/*#__PURE__*/ React.createElement(ExclamationCircleOutlined, {
|
|
32
|
+
size: 24,
|
|
33
|
+
})
|
|
34
|
+
),
|
|
35
|
+
/*#__PURE__*/ React.createElement(
|
|
36
|
+
Text,
|
|
37
|
+
{
|
|
38
|
+
type: "danger",
|
|
39
|
+
},
|
|
40
|
+
error.message
|
|
41
|
+
),
|
|
42
|
+
/*#__PURE__*/ React.createElement(
|
|
43
|
+
Button,
|
|
44
|
+
{
|
|
45
|
+
type: "primary",
|
|
46
|
+
size: "small",
|
|
47
|
+
onClick: reload,
|
|
48
|
+
},
|
|
49
|
+
"\u91CD\u65B0\u52A0\u8F7D"
|
|
50
|
+
)
|
|
51
|
+
)
|
|
52
|
+
);
|
|
31
53
|
}
|
|
32
|
-
return /*#__PURE__*/React.createElement(Empty, {
|
|
33
|
-
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
54
|
+
return /*#__PURE__*/ React.createElement(Empty, {
|
|
55
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE,
|
|
34
56
|
});
|
|
35
|
-
}
|
|
57
|
+
};
|
|
36
58
|
|
|
37
59
|
export { NotFoundContent as default };
|
|
38
60
|
// powered by hdj
|
|
@@ -1,32 +1,36 @@
|
|
|
1
1
|
// welcome to hoo hoo hoo
|
|
2
|
-
import React from
|
|
3
|
-
import _mapInstanceProperty from
|
|
4
|
-
import _indexOfInstanceProperty from
|
|
5
|
-
import CheckBoxOption from
|
|
6
|
-
import NoFindItem from
|
|
2
|
+
import React from "react";
|
|
3
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js/instance/map";
|
|
4
|
+
import _indexOfInstanceProperty from "@babel/runtime-corejs3/core-js/instance/index-of";
|
|
5
|
+
import CheckBoxOption from "./components/CheckBoxOption.js";
|
|
6
|
+
import NoFindItem from "./components/NoFindItem.js";
|
|
7
7
|
|
|
8
8
|
var defaultModeConfig = {
|
|
9
9
|
multiple: {
|
|
10
10
|
icon: null,
|
|
11
11
|
render: function render(item, value) {
|
|
12
|
-
var checkVal =
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
var checkVal =
|
|
13
|
+
value === null || value === void 0
|
|
14
|
+
? void 0
|
|
15
|
+
: _mapInstanceProperty(value).call(value, function (itemVal) {
|
|
16
|
+
return itemVal.value;
|
|
17
|
+
});
|
|
15
18
|
var newVal = checkVal || [];
|
|
16
|
-
var checked =
|
|
17
|
-
|
|
19
|
+
var checked =
|
|
20
|
+
_indexOfInstanceProperty(newVal).call(newVal, item.value) !== -1;
|
|
21
|
+
return /*#__PURE__*/ React.createElement(CheckBoxOption, {
|
|
18
22
|
label: item.label,
|
|
19
|
-
checked: checked
|
|
23
|
+
checked: checked,
|
|
20
24
|
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
25
|
+
},
|
|
26
|
+
},
|
|
23
27
|
};
|
|
24
28
|
var defaultSelectConfig = {
|
|
25
29
|
noMatchItemRender: function noMatchItemRender() {
|
|
26
|
-
return /*#__PURE__*/React.createElement(NoFindItem, {
|
|
27
|
-
label: "选项被删除,请重新选择"
|
|
30
|
+
return /*#__PURE__*/ React.createElement(NoFindItem, {
|
|
31
|
+
label: "选项被删除,请重新选择",
|
|
28
32
|
});
|
|
29
|
-
}
|
|
33
|
+
},
|
|
30
34
|
};
|
|
31
35
|
|
|
32
36
|
export { defaultModeConfig, defaultSelectConfig };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PartialHSelectProps } from "@/components/Select/modal";
|
|
2
2
|
export declare const useValueChange: (params: PartialHSelectProps) => {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
val: any;
|
|
4
|
+
change: (changeVal: any, itemOps: any) => void;
|
|
5
5
|
};
|