zy-react-library 1.0.83 → 1.0.85
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.
|
@@ -63,7 +63,7 @@ function HiddenLevelSelectTree(props) {
|
|
|
63
63
|
}, []);
|
|
64
64
|
|
|
65
65
|
return (
|
|
66
|
-
<BasicSelectTree treeData={treeData} placeholder="隐患级别" nameKey="dictLabel" idKey="dictValue" {...restProps} />
|
|
66
|
+
<BasicSelectTree treeData={treeData} placeholder="隐患级别" onlyLastLevel={true} nameKey="dictLabel" idKey="dictValue" {...restProps} />
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -7,15 +7,10 @@ interface UseDownloadBlobOptions {
|
|
|
7
7
|
params?: Record<string, any>;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
url: string;
|
|
12
|
-
options?: UseDownloadBlobOptions;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type DownloadBlobFunction = (options: downloadBlobOptions) => Promise<any>;
|
|
10
|
+
export type DownloadBlobFunction = (url: string, options: UseDownloadBlobOptions) => Promise<any>;
|
|
16
11
|
|
|
17
12
|
/**
|
|
18
13
|
* 下载Blob流文件
|
|
19
14
|
*/
|
|
20
|
-
export default function
|
|
21
|
-
export default function
|
|
15
|
+
export default function useDownloadBlob(returnType: "array"): [boolean, DownloadBlobFunction];
|
|
16
|
+
export default function useDownloadBlob(returnType?: "object"): { loading: boolean; downloadBlob: DownloadBlobFunction };
|
|
@@ -18,7 +18,7 @@ export default function useDownloadBlob(returnType = "object") {
|
|
|
18
18
|
return reject(new Error("请传入 url"));
|
|
19
19
|
|
|
20
20
|
const { name = "", type = "", params = {} } = options;
|
|
21
|
-
const finalUrl = (process.env.app.API_HOST || window.__JJB_ENVIRONMENT__.API_HOST) + url;
|
|
21
|
+
const finalUrl = new URL((process.env.app.API_HOST || window.__JJB_ENVIRONMENT__.API_HOST) + url);
|
|
22
22
|
Object.entries(params).forEach(([key, value]) => {
|
|
23
23
|
finalUrl.searchParams.append(key, value);
|
|
24
24
|
});
|