@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.
@@ -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);
@@ -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 exFiles={null}
13
- value={files}
14
- request={()=>{
15
- return {
16
- url:"https://inews.gtimg.com/om_bt/OGlQWfsaAoKkuCcMZ2o9IVEPqd-72DQy5EAN02XBHUwfYAA/641",
17
- thumbUrl:"https://inews.gtimg.com/om_bt/OGlQWfsaAoKkuCcMZ2o9IVEPqd-72DQy5EAN02XBHUwfYAA/641"
18
- }
19
- }}
20
- onChange={setFiles}
21
- multiple={true}
22
- maxCount={3}
23
- maxSize={Number.MAX_SAFE_INTEGER}/>
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}