zy-react-library 1.2.28 → 1.2.29

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,6 +11,8 @@ export interface MapProps {
11
11
  area?: string;
12
12
  /** 是否显示所属区域 */
13
13
  showArea?: boolean;
14
+ /** 是否只查看 */
15
+ disable?: boolean;
14
16
  /** 确认选择回调 */
15
17
  onConfirm?: (longitude: number | string, latitude: number | string, extra: { area: string }) => void;
16
18
  /** 地图类型,默认 baidu */
@@ -1 +1 @@
1
- import{Form as e,Row as r,Col as i,Input as l,Button as t}from"antd";import{useState as a}from"react";import d from"./MapSelector.js";import{jsxs as n,Fragment as o,jsx as s}from"react/jsx-runtime";const m=m=>{const{longitudeProps:u="longitude",latitudeProps:p="latitude",onConfirm:c,required:h=!0,area:g="",showArea:f=!1,type:y="baidu"}=m,b=e.useFormInstance(),[q,C]=a(!1),[F,I]=a(""),[x,V]=a("");return n(o,{children:[n(r,{gutter:24,children:[s(i,{span:12,children:s(e.Item,{label:"经度",name:u,rules:[{required:h,message:"请选择经度"}],children:s(l,{disabled:!0})})}),s(i,{span:12,children:s(e.Item,{label:"纬度",required:h,children:n("div",{style:{display:"flex",gap:10},children:[s(e.Item,{name:p,noStyle:!0,rules:[{required:h,message:"请选择纬度"}],children:s(l,{disabled:!0})}),s(t,{type:"primary",onClick:()=>{C(!0),I(b.getFieldValue(u)),V(b.getFieldValue(p))},children:"地图定位"})]})})})]}),s(d,{visible:q,onClose:()=>C(!1),longitude:F,latitude:x,area:g,type:y,showArea:f,onConfirm:(e,r,i)=>{I(e),V(r),b.setFieldsValue({[u]:e,[p]:r}),c?.(e,r,i),C(!1)}})]})};m.displayName="Map";export{m as default};
1
+ import{Form as e,Row as r,Col as i,Input as l,Button as a}from"antd";import{useState as t}from"react";import d from"./MapSelector.js";import{jsxs as n,Fragment as s,jsx as o}from"react/jsx-runtime";const m=m=>{const{longitudeProps:u="longitude",latitudeProps:p="latitude",onConfirm:c,required:h=!0,area:g="",showArea:b=!1,disable:f=!1,type:y="baidu"}=m,q=e.useFormInstance(),[C,F]=t(!1),[I,x]=t(""),[V,j]=t("");return n(s,{children:[n(r,{gutter:24,children:[o(i,{span:12,children:o(e.Item,{label:"经度",name:u,rules:[{required:h,message:"请选择经度"}],children:o(l,{disabled:!0})})}),o(i,{span:12,children:o(e.Item,{label:"纬度",required:h,children:n("div",{style:{display:"flex",gap:10},children:[o(e.Item,{name:p,noStyle:!0,rules:[{required:h,message:"请选择纬度"}],children:o(l,{disabled:!0})}),o(a,{type:"primary",onClick:()=>{F(!0),x(q.getFieldValue(u)),j(q.getFieldValue(p))},children:"地图定位"})]})})})]}),o(d,{visible:C,onClose:()=>F(!1),longitude:I,latitude:V,area:g,type:y,showArea:b,disable:f,onConfirm:(e,r,i)=>{x(e),j(r),q.setFieldsValue({[u]:e,[p]:r}),c?.(e,r,i),F(!1)}})]})};m.displayName="Map";export{m as default};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zy-react-library",
3
3
  "private": false,
4
- "version": "1.2.28",
4
+ "version": "1.2.29",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",