@ecoding/components.antd 0.3.3 → 0.3.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.
@@ -11,12 +11,12 @@ const Picker = (props) => {
11
11
  let value;
12
12
  setDates(v);
13
13
  let dayjsV = dayjs(v);
14
- if (!props.showTime && props.startOf) {
15
- dayjsV = dayjsV.startOf(props.startOf);
16
- }
17
14
  if (!props.showTime && props.endOf) {
18
15
  dayjsV = dayjsV.endOf(props.endOf);
19
16
  }
17
+ if (!props.showTime && props.startOf) {
18
+ dayjsV = dayjsV.startOf(props.startOf);
19
+ }
20
20
  if (props.format) {
21
21
  value = dayjsV.format(props.format || "YYYY-MM-DD HH:mm:ss");
22
22
  }
@@ -8,7 +8,7 @@ interface IProps {
8
8
  value?: IRes | IRes[];
9
9
  empty?: React.ReactNode;
10
10
  i18n?: any;
11
- batchDownload?: string | (() => void);
11
+ batchDownload?: string | ((infos: any) => void);
12
12
  format?: {
13
13
  [props: string]: any;
14
14
  };
@@ -60,18 +60,18 @@ const InfosRender = ({ infos, i18n, format, batchDownload }) => {
60
60
  }
61
61
  };
62
62
  const downLoadAll = () => {
63
+ const temp = [];
64
+ checkedList.forEach(key => {
65
+ temp.push(infos.find(info => info.url === key));
66
+ });
63
67
  if (typeof batchDownload === "string") {
64
68
  downloadFile(batchDownload);
65
69
  return;
66
70
  }
67
71
  if (typeof batchDownload === "function") {
68
- batchDownload();
72
+ batchDownload(temp);
69
73
  return;
70
74
  }
71
- const temp = [];
72
- checkedList.forEach(key => {
73
- temp.push(infos.find(info => info.url === key));
74
- });
75
75
  temp.forEach(info => {
76
76
  downloadFile(info.url, info.name);
77
77
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/components.antd",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "author": "cxc",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -43,5 +43,5 @@
43
43
  "antd": "^5.8.4",
44
44
  "axios": "^1.1.2"
45
45
  },
46
- "gitHead": "c78fc7adeab1e6f18ac21eccb0891d38512f6f3b"
46
+ "gitHead": "8257bd625d9b6dc90b1d9732307aff5769d479ac"
47
47
  }