zy-react-library 1.0.21 → 1.0.23

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.
@@ -9,7 +9,7 @@ import type { FORM_ITEM_RENDER_ENUM } from "../../enum/formItemRender";
9
9
  */
10
10
  export type FormItemRenderType
11
11
  = | (typeof FORM_ITEM_RENDER_ENUM)[keyof typeof FORM_ITEM_RENDER_ENUM]
12
- | ((props: { formValues: FormValues; [key: string]: any }) => ReactNode);
12
+ | ((props: { formValues: FormValues; value: any; onChange: (value: any) => void; [key: string]: any }) => ReactNode);
13
13
 
14
14
  /**
15
15
  * 选项项数据类型
@@ -33,14 +33,16 @@ const Map = (props) => {
33
33
  <>
34
34
  <Row gutter={24}>
35
35
  <Col span={12}>
36
- <Form.Item label="经度" name={longitudeProps} style={{ flex: 1 }} rules={[{ required, message: "请选择经度" }]}>
36
+ <Form.Item label="经度" name={longitudeProps} rules={[{ required, message: "请选择经度" }]}>
37
37
  <Input disabled />
38
38
  </Form.Item>
39
39
  </Col>
40
40
  <Col span={12}>
41
- <Form.Item label="纬度" name={latitudeProps} style={{ flex: 1 }} rules={[{ required, message: "请选择纬度" }]}>
41
+ <Form.Item label="纬度" required={required} rules={[{ required, message: "请选择纬度" }]}>
42
42
  <div style={{ display: "flex", gap: 10 }}>
43
- <Input disabled />
43
+ <Form.Item name={latitudeProps} noStyle rules={[{ required, message: "请选择纬度" }]}>
44
+ <Input disabled />
45
+ </Form.Item>
44
46
  <Button type="primary" onClick={() => setMapVisible(true)}>
45
47
  点击定位
46
48
  </Button>
@@ -1,7 +1,6 @@
1
1
  import { message } from "antd";
2
2
  import dayjs from "dayjs";
3
3
  import { useState } from "react";
4
- import { getFileUrl } from "../../utils/index.js";
5
4
 
6
5
  /**
7
6
  * 下载Blob流文件
@@ -13,9 +12,8 @@ export default function useDownloadBlob() {
13
12
  // 下载Blob流文件
14
13
  const downloadBlob = (url, options = { name: "", type: "", params: {} }) => {
15
14
  setLoading(true);
16
- const fileUrl = getFileUrl();
17
15
  return new Promise((resolve, reject) => {
18
- const finalUrl = !url.includes(fileUrl) ? fileUrl + url : url;
16
+ const finalUrl = (process.env.app.API_HOST || window.__JJB_ENVIRONMENT__.API_HOST) + url;
19
17
  Object.entries(options.params).forEach(([key, value]) => {
20
18
  finalUrl.searchParams.append(key, value);
21
19
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.0.21",
4
+ "version": "1.0.23",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",