@hw-component/form 1.6.3 → 1.6.5
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/.eslintcache +1 -1
- package/es/Select/hooks/changeHooks.js +34 -147
- package/es/Select/hooks/norHooks.d.ts +2 -3
- package/es/Select/hooks/norHooks.js +9 -1
- package/es/Select/hooks/util.d.ts +10 -0
- package/es/Select/hooks/util.js +138 -0
- package/lib/Select/hooks/changeHooks.js +35 -148
- package/lib/Select/hooks/norHooks.d.ts +2 -3
- package/lib/Select/hooks/norHooks.js +9 -1
- package/lib/Select/hooks/util.d.ts +10 -0
- package/lib/Select/hooks/util.js +139 -0
- package/package.json +1 -1
- package/src/components/Select/hooks/changeHooks.tsx +31 -113
- package/src/components/Select/hooks/norHooks.ts +69 -66
- package/src/components/Select/hooks/util.ts +106 -0
- package/src/components/Select/index.tsx +5 -5
- package/src/components/Select/modal.ts +3 -5
- package/src/pages/Form/index.tsx +1 -11
- package/src/pages/Select/index.tsx +25 -25
package/src/pages/Form/index.tsx
CHANGED
|
@@ -24,16 +24,6 @@ const Test3 = ({ value, onChange }) => {
|
|
|
24
24
|
);
|
|
25
25
|
};
|
|
26
26
|
const formData = (options) => {
|
|
27
|
-
const op = [
|
|
28
|
-
{
|
|
29
|
-
key: 1,
|
|
30
|
-
value: "是",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
key: 0,
|
|
34
|
-
value: "否",
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
27
|
return [
|
|
38
28
|
{
|
|
39
29
|
label: "12321",
|
|
@@ -45,7 +35,7 @@ const formData = (options) => {
|
|
|
45
35
|
},
|
|
46
36
|
},
|
|
47
37
|
{
|
|
48
|
-
label: "
|
|
38
|
+
label: "下拉",
|
|
49
39
|
className: "hdjd",
|
|
50
40
|
type: "select",
|
|
51
41
|
name: "test321",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HSelect } from "../../components";
|
|
2
|
-
import {Space} from "antd";
|
|
2
|
+
import { Space } from "antd";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
export default () => {
|
|
5
5
|
const [selectVal, setSelectVal] = useState(null);
|
|
@@ -7,7 +7,7 @@ export default () => {
|
|
|
7
7
|
<Space size={"large"} direction={"vertical"} style={{ width: "100%" }}>
|
|
8
8
|
<HSelect
|
|
9
9
|
options={[{ label: "测试", value: 1 }]}
|
|
10
|
-
value={
|
|
10
|
+
value={1}
|
|
11
11
|
placeholder="基础"
|
|
12
12
|
allowClear={true}
|
|
13
13
|
/>
|
|
@@ -18,7 +18,7 @@ export default () => {
|
|
|
18
18
|
{ name: "测试2", value: 20, userId: 112321 },
|
|
19
19
|
]}
|
|
20
20
|
placeholder="多选"
|
|
21
|
-
value={
|
|
21
|
+
value={[10, 20]}
|
|
22
22
|
onChange={(val, option) => {
|
|
23
23
|
setSelectVal(val);
|
|
24
24
|
}}
|
|
@@ -37,28 +37,28 @@ export default () => {
|
|
|
37
37
|
{ label: "测试2", value: 20 },
|
|
38
38
|
]}
|
|
39
39
|
/>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
40
|
+
<HSelect
|
|
41
|
+
placeholder="分页"
|
|
42
|
+
serviceSearch
|
|
43
|
+
allowClear={true}
|
|
44
|
+
labelInValue
|
|
45
|
+
mode="multiple"
|
|
46
|
+
value={["21321312"]}
|
|
47
|
+
request={(params) => {
|
|
48
|
+
const { page, size } = params;
|
|
49
|
+
const op = [];
|
|
50
|
+
for (let i = 0; i < size; i += 1) {
|
|
51
|
+
op.push({ label: `第${page}页第${i}条`, value: i + page });
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
page,
|
|
55
|
+
size: 100,
|
|
56
|
+
total: 1000,
|
|
57
|
+
data: op,
|
|
58
|
+
};
|
|
59
|
+
}}
|
|
60
|
+
isList
|
|
61
|
+
/>
|
|
62
62
|
<HSelect
|
|
63
63
|
serviceSearch={true}
|
|
64
64
|
request={(params) => {
|