@hw-component/form 1.6.1 → 1.6.3
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 +10 -6
- package/es/Select/hooks/norHooks.d.ts +6 -4
- package/es/Select/hooks/norHooks.js +137 -29
- package/es/Select/index.js +17 -12
- package/es/Select/modal.d.ts +11 -2
- package/lib/Select/hooks/changeHooks.js +10 -6
- package/lib/Select/hooks/norHooks.d.ts +6 -4
- package/lib/Select/hooks/norHooks.js +136 -28
- package/lib/Select/index.js +16 -11
- package/lib/Select/modal.d.ts +11 -2
- package/package.json +1 -1
- package/src/components/DialogForm/DrawerForm/index.tsx +1 -1
- package/src/components/DialogForm/ModalForm.tsx +1 -1
- package/src/components/Form/hooks/useDefaultRender.tsx +1 -1
- package/src/components/Form/hooks/useHForm.ts +1 -1
- package/src/components/Form/index.tsx +4 -4
- package/src/components/Input/ButtonInput.tsx +2 -2
- package/src/components/Select/hooks/changeHooks.tsx +9 -6
- package/src/components/Select/hooks/norHooks.ts +107 -17
- package/src/components/Select/index.tsx +7 -2
- package/src/components/Select/modal.ts +14 -2
- package/src/components/Submit/components.tsx +7 -3
- package/src/components/Upload/hooks/customRequest.ts +6 -6
- package/src/pages/DrawerForm/index.tsx +18 -1
- package/src/pages/Form/index.tsx +21 -18
- package/src/pages/Select/index.tsx +23 -1
- package/src/pages/Upload/index.tsx +16 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HSelect } from "../../components";
|
|
2
|
-
import {
|
|
2
|
+
import {Space} from "antd";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
export default () => {
|
|
5
5
|
const [selectVal, setSelectVal] = useState(null);
|
|
@@ -37,6 +37,28 @@ export default () => {
|
|
|
37
37
|
{ label: "测试2", value: 20 },
|
|
38
38
|
]}
|
|
39
39
|
/>
|
|
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
|
+
/>
|
|
40
62
|
<HSelect
|
|
41
63
|
serviceSearch={true}
|
|
42
64
|
request={(params) => {
|
|
@@ -6,21 +6,24 @@ import { MediaTypeEnum } from "../../components/Upload/enums";
|
|
|
6
6
|
export default () => {
|
|
7
7
|
const [files, setFiles] = useState([]);
|
|
8
8
|
const [files1, setFiles1] = useState([]);
|
|
9
|
-
console.log(files)
|
|
9
|
+
console.log(files);
|
|
10
10
|
return (
|
|
11
11
|
<Space size={"large"} direction={"vertical"} style={{ width: "100%" }}>
|
|
12
|
-
<HUpload
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
12
|
+
<HUpload
|
|
13
|
+
exFiles={null}
|
|
14
|
+
value={files}
|
|
15
|
+
request={() => {
|
|
16
|
+
return {
|
|
17
|
+
url: "https://inews.gtimg.com/om_bt/OGlQWfsaAoKkuCcMZ2o9IVEPqd-72DQy5EAN02XBHUwfYAA/641",
|
|
18
|
+
thumbUrl:
|
|
19
|
+
"https://inews.gtimg.com/om_bt/OGlQWfsaAoKkuCcMZ2o9IVEPqd-72DQy5EAN02XBHUwfYAA/641",
|
|
20
|
+
};
|
|
21
|
+
}}
|
|
22
|
+
onChange={setFiles}
|
|
23
|
+
multiple={true}
|
|
24
|
+
maxCount={3}
|
|
25
|
+
maxSize={Number.MAX_SAFE_INTEGER}
|
|
26
|
+
/>
|
|
24
27
|
<HUrlUpload
|
|
25
28
|
value={files1}
|
|
26
29
|
mediaType={MediaTypeEnum.file}
|