zy-react-library 1.1.3 → 1.1.4

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.
@@ -1 +1 @@
1
- import{Spin as e,Form as t,Row as n,Col as i,Space as r,Button as o,message as s}from"antd";import{useState as l,useEffect as a}from"react";import d from"./FormItemsRenderer.js";import{jsx as u,jsxs as c,Fragment as p}from"react/jsx-runtime";const m=m=>{const{values:h,options:g,gutter:w=24,span:x=12,labelCol:b={span:4},useAutoGenerateRequired:y=!0,showActionButtons:f=!0,submitButtonText:B="提交",cancelButtonText:A="取消",showSubmitButton:C=!0,showCancelButton:T=!0,customActionButtons:v,extraActionButtons:F,loading:k=!1,...q}=m,[E,R]=l(window.innerWidth),j=()=>{const e=document.querySelector("#page");e&&R(e.offsetWidth)};return a(()=>{const e=setTimeout(()=>{j()},0);return window.addEventListener("resize",j),()=>{window.removeEventListener("resize",j),clearTimeout(e)}},[]),u(e,{spinning:k,children:c(t,{labelCol:b,scrollToFirstError:!0,wrapperCol:{span:24-b.span},initialValues:h,onFinishFailed:()=>{s.error("请补全必填项")},style:{width:`calc(100% - ${2*w}px)`,margin:"0 auto"},...q,children:[u(n,{gutter:w,children:u(d,{options:g,labelCol:b,span:x,gutter:w,useAutoGenerateRequired:y,initialValues:h})}),f&&c(p,{children:[u("div",{style:{height:"32px"}}),u(n,{style:{textAlign:"center",backgroundColor:"rgb(241, 241, 242)",padding:"10px 0",position:"fixed",bottom:"0",width:E,margin:"0 -44px"},children:u(i,{span:24,style:{textAlign:"center"},children:v||c(r,{children:[C&&u(o,{type:"primary",htmlType:"submit",children:B}),F,T&&u(o,{onClick:()=>{window.history.back()},children:A})]})})})]})]})})};m.displayName="FormBuilder";export{m as default};
1
+ import{Spin as e,Form as t,Row as n,Col as i,Space as r,Button as o,message as s}from"antd";import{useState as l,useEffect as a}from"react";import d from"./FormItemsRenderer.js";import{jsx as u,jsxs as c,Fragment as p}from"react/jsx-runtime";const m=m=>{const{values:h,options:g,gutter:w=24,span:x=12,labelCol:b={span:4},useAutoGenerateRequired:y=!0,showActionButtons:f=!0,submitButtonText:B="提交",cancelButtonText:A="取消",showSubmitButton:C=!0,showCancelButton:T=!0,customActionButtons:v,extraActionButtons:F,loading:k=!1,...q}=m,[E,R]=l(window.innerWidth),j=()=>{const e=document.querySelector("#page");e&&R(e.offsetWidth)};return a(()=>{const e=setTimeout(()=>{j()},0);return f&&window.addEventListener("resize",j),()=>{f&&window.removeEventListener("resize",j),clearTimeout(e)}},[f]),u(e,{spinning:k,children:c(t,{labelCol:b,scrollToFirstError:!0,wrapperCol:{span:24-b.span},initialValues:h,onFinishFailed:()=>{s.error("请补全必填项")},style:{width:`calc(100% - ${2*w}px)`,margin:"0 auto"},...q,children:[u(n,{gutter:w,children:u(d,{options:g,labelCol:b,span:x,gutter:w,useAutoGenerateRequired:y,initialValues:h})}),f&&c(p,{children:[u("div",{style:{height:"32px"}}),u(n,{style:{textAlign:"center",backgroundColor:"rgb(241, 241, 242)",padding:"10px 0",position:"fixed",bottom:"0",width:E,margin:"0 -44px"},children:u(i,{span:24,style:{textAlign:"center"},children:v||c(r,{children:[C&&u(o,{type:"primary",htmlType:"submit",children:B}),F,T&&u(o,{onClick:()=>{window.history.back()},children:A})]})})})]})]})})};m.displayName="FormBuilder";export{m as default};
@@ -1 +1 @@
1
- import{Space as e,Button as t}from"antd";import{useState as i,useEffect as o}from"react";import r from"../HeaderBack/index.js";import{jsxs as n,jsx as d,Fragment as s}from"react/jsx-runtime";function a(a){const{headerTitle:c,history:l,isShowHeader:h=!0,headerPrevious:m=!0,isShowFooter:p=!0,isShowAllAction:u=!0,backButtonText:g="关闭",contentPadding:w="20px",customActionButtons:x,extraActionButtons:f}=a,[v,y]=i(window.innerWidth),k=()=>{const e=document.querySelector("#page");e&&y(e.offsetWidth)};return o(()=>{const e=setTimeout(()=>{k()},0);return window.addEventListener("resize",k),()=>{window.removeEventListener("resize",k),clearTimeout(e)}},[]),n("div",{className:"page",id:"page",children:[u&&h&&d(r,{title:c,history:l,previous:m}),d("div",{style:{padding:w},children:a.children}),u&&p&&n(s,{children:[d("div",{style:{height:"32px"}}),d("div",{style:{textAlign:"center",backgroundColor:"rgb(241, 241, 242)",padding:"10px 0",position:"fixed",bottom:"0",width:v,margin:"0px -44px"},children:x||n(e,{children:[f,d(t,{onClick:()=>l?.goBack?.()||window.history.back(),children:g})]})})]})]})}a.displayName="Page";export{a as default};
1
+ import{Space as e,Button as t}from"antd";import{useState as i,useEffect as o}from"react";import r from"../HeaderBack/index.js";import{jsxs as n,jsx as d,Fragment as s}from"react/jsx-runtime";function a(a){const{headerTitle:c,history:l,isShowHeader:h=!0,headerPrevious:m=!0,isShowFooter:p=!0,isShowAllAction:u=!0,backButtonText:g="关闭",contentPadding:w="20px",customActionButtons:x,extraActionButtons:f}=a,[v,y]=i(window.innerWidth),k=()=>{const e=document.querySelector("#page");e&&y(e.offsetWidth)};return o(()=>{const e=setTimeout(()=>{k()},0);return u&&p&&window.addEventListener("resize",k),()=>{u&&p&&window.removeEventListener("resize",k),clearTimeout(e)}},[u,p]),n("div",{className:"page",id:"page",children:[u&&h&&d(r,{title:c,history:l,previous:m}),n("div",{style:{padding:w},children:[a.children,u&&p&&n(s,{children:[d("div",{style:{height:"52px"}}),d("div",{style:{textAlign:"center",backgroundColor:"rgb(241, 241, 242)",padding:"10px 0",position:"fixed",bottom:"0",width:v,margin:"0px -20px"},children:x||n(e,{children:[f,d(t,{onClick:()=>l?.goBack?.()||window.history.back(),children:g})]})})]})]})]})}a.displayName="Page";export{a 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.1.3",
4
+ "version": "1.1.4",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",