zy-react-library 1.0.120 → 1.0.121

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.
@@ -17,8 +17,8 @@ const Map = (props) => {
17
17
 
18
18
  const form = Form.useFormInstance();
19
19
  const [mapVisible, setMapVisible] = useState(false);
20
- const [currentLongitude, setCurrentLongitude] = useState(form.getFieldValue(longitudeProps) || "");
21
- const [currentLatitude, setCurrentLatitude] = useState(form.getFieldValue(latitudeProps) || "");
20
+ const [currentLongitude, setCurrentLongitude] = useState("");
21
+ const [currentLatitude, setCurrentLatitude] = useState("");
22
22
 
23
23
  const handleMapConfirm = (longitudeValue, latitudeValue, extra) => {
24
24
  setCurrentLongitude(longitudeValue);
@@ -45,7 +45,11 @@ const Map = (props) => {
45
45
  <Form.Item name={latitudeProps} noStyle rules={[{ required, message: "请选择纬度" }]}>
46
46
  <Input disabled />
47
47
  </Form.Item>
48
- <Button type="primary" onClick={() => setMapVisible(true)}>
48
+ <Button type="primary" onClick={() => {
49
+ setMapVisible(true);
50
+ setCurrentLongitude(form.getFieldValue(longitudeProps));
51
+ setCurrentLatitude(form.getFieldValue(latitudeProps));
52
+ }}>
49
53
  地图定位
50
54
  </Button>
51
55
  </div>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.0.120",
4
+ "version": "1.0.121",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",