zy-react-library 1.3.15 → 1.3.16

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.
@@ -16,6 +16,8 @@ export interface PageProps {
16
16
  isShowFooter?: boolean;
17
17
  /** 是否显示头部和底部组件,默认 true */
18
18
  isShowAllAction?: boolean;
19
+ /** 是否处于加载状态,默认 false */
20
+ loading?: boolean;
19
21
  /** 取消按钮文字,默认 "关闭" */
20
22
  backButtonText?: string;
21
23
  /** 内容区域的padding,默认 "20px" */
@@ -1 +1 @@
1
- import{Space as e,Button as t}from"antd";import{useState as o,useEffect as i}from"react";import{throttle as r}from"throttle-debounce";import n from"../HeaderBack/index.js";import{jsxs as d,jsx as a}from"react/jsx-runtime";function s(s){const{headerTitle:c,history:l,isShowHeader:p=!0,headerPrevious:u=!0,isShowFooter:h=!0,isShowAllAction:m=!0,backButtonText:g="关闭",contentPadding:y="20px",customActionButtons:f,extraActionButtons:x,children:w}=s,[v,b]=o(window.innerWidth),k=r(50,()=>{const e=document.querySelector("#page-layout");e&&b(e.offsetWidth)});return i(()=>{const e=setTimeout(()=>{k()},0);return m&&h&&window.addEventListener("resize",k),()=>{m&&h&&window.removeEventListener("resize",k),clearTimeout(e)}},[m,h]),d("div",{className:"page-layout",id:"page-layout",children:[m&&p&&a(n,{title:c,history:l,previous:u}),d("div",{style:{padding:y},children:[w&&"function"==typeof w?w():w,m&&h&&d("div",{className:"page-layout-footer",style:{position:"relative",zIndex:"9"},children:[a("div",{style:{height:"52px"}}),a("div",{style:{textAlign:"center",backgroundColor:"rgb(241, 241, 242)",padding:"10px 0",position:"fixed",bottom:"0",width:v,margin:"0px -20px"},children:f||d(e,{children:[x,a(t,{onClick:()=>l?.goBack?.()||window.history.back(),children:g})]})})]})]})]})}s.displayName="Page";export{s as default};
1
+ import{Spin as e,Space as t,Button as i}from"antd";import{useState as o,useEffect as n}from"react";import{throttle as r}from"throttle-debounce";import d from"../HeaderBack/index.js";import{jsx as a,jsxs as s}from"react/jsx-runtime";function c(c){const{headerTitle:l,history:p,isShowHeader:h=!0,headerPrevious:u=!0,isShowFooter:m=!0,isShowAllAction:g=!0,loading:y=!1,backButtonText:f="关闭",contentPadding:x="20px",customActionButtons:w,extraActionButtons:v,children:b}=c,[k,A]=o(window.innerWidth),B=r(50,()=>{const e=document.querySelector("#page-layout");e&&A(e.offsetWidth)});return n(()=>{const e=setTimeout(()=>{B()},0);return g&&m&&window.addEventListener("resize",B),()=>{g&&m&&window.removeEventListener("resize",B),clearTimeout(e)}},[g,m]),a(e,{spinning:y,children:s("div",{className:"page-layout",id:"page-layout",children:[g&&h&&a(d,{title:l,history:p,previous:u}),s("div",{style:{padding:x},children:[b&&"function"==typeof b?b():b,g&&m&&s("div",{className:"page-layout-footer",style:{position:"relative",zIndex:"9"},children:[a("div",{style:{height:"52px"}}),a("div",{style:{textAlign:"center",backgroundColor:"rgb(241, 241, 242)",padding:"10px 0",position:"fixed",bottom:"0",width:k,margin:"0px -20px"},children:w||s(t,{children:[v,a(i,{onClick:()=>p?.goBack?.()||window.history.back(),children:f})]})})]})]})]})})}c.displayName="Page";export{c 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.3.15",
4
+ "version": "1.3.16",
5
5
  "type": "module",
6
6
  "description": "",
7
7
  "author": "LiuJiaNan",