You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
17 KiB
1 lines
17 KiB
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2736],{75899:function(de,Z,s){s.r(Z),s.d(Z,{default:function(){return c}});var r=s(29195),T=s.n(r),O=s(56717),M=s.n(O),J=s(97380),L=s.n(J),K=s(89336),w=s(7676),H=s(5754),oe=s(66197),I=s(30869),Q=s(37123),N=s(65906),q=s(45161),k=s(94154),W=s(10951),P=s(18283),ue=s(93957),G=s(498),U=s(79685),_=s(24507),R=(0,_.kc)(function(){return{card:{marginBottom:"24px"},result:{maxWidth:"560px",margin:"0 auto",padding:"24px 0 8px"}}}),ee=R,a=s(63342),z=function(E){var v=E.stepData,f=E.bordered,C=v.payAccount,m=v.receiverAccount,h=v.receiverName,$=v.amount;return(0,a.jsxs)(N.Z,{column:1,bordered:f,children:[(0,a.jsxs)(N.Z.Item,{label:"\u4ED8\u6B3E\u8D26\u6237",children:[" ",C]}),(0,a.jsxs)(N.Z.Item,{label:"\u6536\u6B3E\u8D26\u6237",children:[" ",m]}),(0,a.jsxs)(N.Z.Item,{label:"\u6536\u6B3E\u4EBA\u59D3\u540D",children:[" ",h]}),(0,a.jsx)(N.Z.Item,{label:"\u8F6C\u8D26\u91D1\u989D",children:(0,a.jsx)(q.Z,{value:$,suffix:(0,a.jsx)("span",{style:{fontSize:14},children:"\u5143"}),precision:2})})]})},g=function(E){var v=ee(),f=v.styles;return(0,a.jsx)(k.ZP,{status:"success",title:"\u64CD\u4F5C\u6210\u529F",subTitle:"\u9884\u8BA1\u4E24\u5C0F\u65F6\u5185\u5230\u8D26",extra:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(W.ZP,{type:"primary",onClick:E.onFinish,children:"\u518D\u8F6C\u4E00\u7B14"}),(0,a.jsx)(W.ZP,{children:"\u67E5\u770B\u8D26\u5355"})]}),className:f.result,children:E.children})},d=function(){var E=ee(),v=E.styles,f=(0,U.useState)({payAccount:"ant-design@alipay.com",receiverAccount:"test@example.com",receiverName:"Alex",amount:"500",receiverMode:"alipay"}),C=L()(f,2),m=C[0],h=C[1],$=(0,U.useState)(0),y=L()($,2),x=y[0],e=y[1],t=(0,U.useRef)();return(0,a.jsx)(K._z,{content:"\u5C06\u4E00\u4E2A\u5197\u957F\u6216\u7528\u6237\u4E0D\u719F\u6089\u7684\u8868\u5355\u4EFB\u52A1\u5206\u6210\u591A\u4E2A\u6B65\u9AA4\uFF0C\u6307\u5BFC\u7528\u6237\u5B8C\u6210\u3002",children:(0,a.jsxs)(P.Z,{bordered:!1,children:[(0,a.jsxs)(w.L0,{current:x,onCurrentChange:e,submitter:{render:function(n,l){return n.step===2?null:l}},children:[(0,a.jsxs)(w.L0.StepForm,{formRef:t,title:"\u586B\u5199\u8F6C\u8D26\u4FE1\u606F",initialValues:m,onFinish:function(){var o=M()(T()().mark(function n(l){return T()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return h(l),u.abrupt("return",!0);case 2:case"end":return u.stop()}},n)}));return function(n){return o.apply(this,arguments)}}(),children:[(0,a.jsx)(H.Z,{label:"\u4ED8\u6B3E\u8D26\u6237",width:"md",name:"payAccount",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4ED8\u6B3E\u8D26\u6237"}],valueEnum:{"ant-design@alipay.com":"ant-design@alipay.com"}}),(0,a.jsxs)(oe.A.Group,{title:"\u6536\u6B3E\u8D26\u6237",size:8,children:[(0,a.jsx)(H.Z,{name:"receiverMode",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u4ED8\u6B3E\u8D26\u6237"}],valueEnum:{alipay:"\u652F\u4ED8\u5B9D",bank:"\u94F6\u884C\u8D26\u6237"}}),(0,a.jsx)(I.Z,{name:"receiverAccount",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6536\u6B3E\u4EBA\u8D26\u6237"},{type:"email",message:"\u8D26\u6237\u540D\u5E94\u4E3A\u90AE\u7BB1\u683C\u5F0F"}],placeholder:"test@example.com"})]}),(0,a.jsx)(I.Z,{label:"\u6536\u6B3E\u4EBA\u59D3\u540D",width:"md",name:"receiverName",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6536\u6B3E\u4EBA\u59D3\u540D"}],placeholder:"\u8BF7\u8F93\u5165\u6536\u6B3E\u4EBA\u59D3\u540D"}),(0,a.jsx)(Q.Z,{label:"\u8F6C\u8D26\u91D1\u989D",name:"amount",width:"md",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F6C\u8D26\u91D1\u989D"},{pattern:/^(\d+)((?:\.\d+)?)$/,message:"\u8BF7\u8F93\u5165\u5408\u6CD5\u91D1\u989D\u6570\u5B57"}],placeholder:"\u8BF7\u8F93\u5165\u91D1\u989D",fieldProps:{prefix:"\uFFE5"}})]}),(0,a.jsx)(w.L0.StepForm,{title:"\u786E\u8BA4\u8F6C\u8D26\u4FE1\u606F",children:(0,a.jsxs)("div",{className:v.result,children:[(0,a.jsx)(ue.Z,{closable:!0,showIcon:!0,message:"\u786E\u8BA4\u8F6C\u8D26\u540E\uFF0C\u8D44\u91D1\u5C06\u76F4\u63A5\u6253\u5165\u5BF9\u65B9\u8D26\u6237\uFF0C\u65E0\u6CD5\u9000\u56DE\u3002",style:{marginBottom:24}}),(0,a.jsx)(z,{stepData:m,bordered:!0}),(0,a.jsx)(G.Z,{style:{margin:"24px 0"}}),(0,a.jsx)(I.Z.Password,{label:"\u652F\u4ED8\u5BC6\u7801",width:"md",name:"password",required:!1,rules:[{required:!0,message:"\u9700\u8981\u652F\u4ED8\u5BC6\u7801\u624D\u80FD\u8FDB\u884C\u652F\u4ED8"}]})]})}),(0,a.jsx)(w.L0.StepForm,{title:"\u5B8C\u6210",children:(0,a.jsx)(g,{onFinish:M()(T()().mark(function o(){var n;return T()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:e(0),(n=t.current)===null||n===void 0||n.resetFields();case 2:case"end":return i.stop()}},o)})),children:(0,a.jsx)(z,{stepData:m})})})]}),(0,a.jsx)(G.Z,{style:{margin:"40px 0 24px"}}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{children:"\u8BF4\u660E"}),(0,a.jsx)("h4",{children:"\u8F6C\u8D26\u5230\u652F\u4ED8\u5B9D\u8D26\u6237"}),(0,a.jsx)("p",{children:"\u5982\u679C\u9700\u8981\uFF0C\u8FD9\u91CC\u53EF\u4EE5\u653E\u4E00\u4E9B\u5173\u4E8E\u4EA7\u54C1\u7684\u5E38\u89C1\u95EE\u9898\u8BF4\u660E\u3002\u5982\u679C\u9700\u8981\uFF0C\u8FD9\u91CC\u53EF\u4EE5\u653E\u4E00\u4E9B\u5173\u4E8E\u4EA7\u54C1\u7684\u5E38\u89C1\u95EE\u9898\u8BF4\u660E\u3002\u5982\u679C\u9700\u8981\uFF0C\u8FD9\u91CC\u53EF\u4EE5\u653E\u4E00\u4E9B\u5173\u4E8E\u4EA7\u54C1\u7684\u5E38\u89C1\u95EE\u9898\u8BF4\u660E\u3002"}),(0,a.jsx)("h4",{children:"\u8F6C\u8D26\u5230\u94F6\u884C\u5361"}),(0,a.jsx)("p",{children:"\u5982\u679C\u9700\u8981\uFF0C\u8FD9\u91CC\u53EF\u4EE5\u653E\u4E00\u4E9B\u5173\u4E8E\u4EA7\u54C1\u7684\u5E38\u89C1\u95EE\u9898\u8BF4\u660E\u3002\u5982\u679C\u9700\u8981\uFF0C\u8FD9\u91CC\u53EF\u4EE5\u653E\u4E00\u4E9B\u5173\u4E8E\u4EA7\u54C1\u7684\u5E38\u89C1\u95EE\u9898\u8BF4\u660E\u3002\u5982\u679C\u9700\u8981\uFF0C\u8FD9\u91CC\u53EF\u4EE5\u653E\u4E00\u4E9B\u5173\u4E8E\u4EA7\u54C1\u7684\u5E38\u89C1\u95EE\u9898\u8BF4\u660E\u3002"})]})]})})},c=d},65906:function(de,Z,s){s.d(Z,{Z:function(){return x}});var r=s(79685),T=s(68591),O=s.n(T),M=s(85817),J=s(99248),L=s(73064),K=s(79301),H={xxl:3,xl:3,lg:3,md:3,sm:2,xs:1},I=r.createContext({}),Q=s(89259),N=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const q=e=>(0,Q.Z)(e).map(t=>Object.assign(Object.assign({},t==null?void 0:t.props),{key:t.key}));function k(e,t,o){const n=r.useMemo(()=>t||q(o),[t,o]);return r.useMemo(()=>n.map(i=>{var{span:u}=i,j=N(i,["span"]);return Object.assign(Object.assign({},j),{span:typeof u=="number"?u:(0,M.m9)(e,u)})}),[n,e])}function W(e,t,o){let n=e,l=!1;return(o===void 0||o>t)&&(n=Object.assign(Object.assign({},e),{span:t}),l=o!==void 0),[n,l]}function P(e,t){const o=[];let n=[],l=t,i=!1;return e.filter(u=>u).forEach((u,j)=>{const D=u==null?void 0:u.span,S=D||1;if(j===e.length-1){const[b,B]=W(u,l,D);i=i||B,n.push(b),o.push(n);return}if(S<l)l-=S,n.push(u);else{const[b,B]=W(u,l,S);i=i||B,n.push(b),o.push(n),l=t,n=[]}}),[o,i]}var G=(e,t)=>{const[o,n]=(0,r.useMemo)(()=>P(t,e),[t,e]);return o},_=e=>{let{children:t}=e;return t};function R(e){return e!=null}var a=e=>{const{itemPrefixCls:t,component:o,span:n,className:l,style:i,labelStyle:u,contentStyle:j,bordered:D,label:S,content:b,colon:B}=e,X=o;return D?r.createElement(X,{className:O()({[`${t}-item-label`]:R(S),[`${t}-item-content`]:R(b)},l),style:i,colSpan:n},R(S)&&r.createElement("span",{style:u},S),R(b)&&r.createElement("span",{style:j},b)):r.createElement(X,{className:O()(`${t}-item`,l),style:i,colSpan:n},r.createElement("div",{className:`${t}-item-container`},(S||S===0)&&r.createElement("span",{className:O()(`${t}-item-label`,{[`${t}-item-no-colon`]:!B}),style:u},S),(b||b===0)&&r.createElement("span",{className:O()(`${t}-item-content`),style:j},b)))};function z(e,t,o){let{colon:n,prefixCls:l,bordered:i}=t,{component:u,type:j,showLabel:D,showContent:S,labelStyle:b,contentStyle:B}=o;return e.map((X,V)=>{let{label:te,children:ie,prefixCls:ne=l,className:se,style:re,labelStyle:A,contentStyle:F,span:Y=1,key:le}=X;return typeof u=="string"?r.createElement(a,{key:`${j}-${le||V}`,className:se,style:re,labelStyle:Object.assign(Object.assign({},b),A),contentStyle:Object.assign(Object.assign({},B),F),span:Y,colon:n,component:u,itemPrefixCls:ne,bordered:i,label:D?te:null,content:S?ie:null}):[r.createElement(a,{key:`label-${le||V}`,className:se,style:Object.assign(Object.assign(Object.assign({},b),re),A),span:1,colon:n,component:u[0],itemPrefixCls:ne,bordered:i,label:te}),r.createElement(a,{key:`content-${le||V}`,className:se,style:Object.assign(Object.assign(Object.assign({},B),re),F),span:Y*2-1,component:u[1],itemPrefixCls:ne,bordered:i,content:ie})]})}var d=e=>{const t=r.useContext(I),{prefixCls:o,vertical:n,row:l,index:i,bordered:u}=e;return n?r.createElement(r.Fragment,null,r.createElement("tr",{key:`label-${i}`,className:`${o}-row`},z(l,e,Object.assign({component:"th",type:"label",showLabel:!0},t))),r.createElement("tr",{key:`content-${i}`,className:`${o}-row`},z(l,e,Object.assign({component:"td",type:"content",showContent:!0},t)))):r.createElement("tr",{key:i,className:`${o}-row`},z(l,e,Object.assign({component:u?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0},t)))},c=s(26477),p=s(4614),E=s(44244),v=s(25830);const f=e=>{const{componentCls:t,labelBg:o}=e;return{[`&${t}-bordered`]:{[`> ${t}-view`]:{border:`${(0,c.bf)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"> table":{tableLayout:"auto",borderCollapse:"collapse"},[`${t}-row`]:{borderBottom:`${(0,c.bf)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBottom:"none"},[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,c.bf)(e.padding)} ${(0,c.bf)(e.paddingLG)}`,borderInlineEnd:`${(0,c.bf)(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`> ${t}-item-label`]:{color:e.colorTextSecondary,backgroundColor:o,"&::after":{display:"none"}}}},[`&${t}-middle`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,c.bf)(e.paddingSM)} ${(0,c.bf)(e.paddingLG)}`}}},[`&${t}-small`]:{[`${t}-row`]:{[`> ${t}-item-label, > ${t}-item-content`]:{padding:`${(0,c.bf)(e.paddingXS)} ${(0,c.bf)(e.padding)}`}}}}}},C=e=>{const{componentCls:t,extraColor:o,itemPaddingBottom:n,colonMarginRight:l,colonMarginLeft:i,titleMarginBottom:u}=e;return{[t]:Object.assign(Object.assign(Object.assign({},(0,p.Wf)(e)),f(e)),{["&-rtl"]:{direction:"rtl"},[`${t}-header`]:{display:"flex",alignItems:"center",marginBottom:u},[`${t}-title`]:Object.assign(Object.assign({},p.vS),{flex:"auto",color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}),[`${t}-extra`]:{marginInlineStart:"auto",color:o,fontSize:e.fontSize},[`${t}-view`]:{width:"100%",borderRadius:e.borderRadiusLG,table:{width:"100%",tableLayout:"fixed"}},[`${t}-row`]:{"> th, > td":{paddingBottom:n},"&:last-child":{borderBottom:"none"}},[`${t}-item-label`]:{color:e.colorTextTertiary,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${(0,c.bf)(i)} ${(0,c.bf)(l)}`},[`&${t}-item-no-colon::after`]:{content:'""'}},[`${t}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${t}-item-content`]:{display:"table-cell",flex:1,color:e.contentColor,fontSize:e.fontSize,lineHeight:e.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${t}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${t}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${t}-item-content`]:{display:"inline-flex",alignItems:"baseline"}}},"&-middle":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingSM}}},"&-small":{[`${t}-row`]:{"> th, > td":{paddingBottom:e.paddingXS}}}})}},m=e=>({labelBg:e.colorFillAlter,titleColor:e.colorText,titleMarginBottom:e.fontSizeSM*e.lineHeightSM,itemPaddingBottom:e.padding,colonMarginRight:e.marginXS,colonMarginLeft:e.marginXXS/2,contentColor:e.colorText,extraColor:e.colorText});var h=(0,E.I$)("Descriptions",e=>{const t=(0,v.TS)(e,{});return C(t)},m),$=function(e,t){var o={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,n=Object.getOwnPropertySymbols(e);l<n.length;l++)t.indexOf(n[l])<0&&Object.prototype.propertyIsEnumerable.call(e,n[l])&&(o[n[l]]=e[n[l]]);return o};const y=e=>{const{prefixCls:t,title:o,extra:n,column:l,colon:i=!0,bordered:u,layout:j,children:D,className:S,rootClassName:b,style:B,size:X,labelStyle:V,contentStyle:te,items:ie}=e,ne=$(e,["prefixCls","title","extra","column","colon","bordered","layout","children","className","rootClassName","style","size","labelStyle","contentStyle","items"]),{getPrefixCls:se,direction:re,descriptions:A}=r.useContext(J.E_),F=se("descriptions",t),Y=(0,K.Z)(),le=r.useMemo(()=>{var ae;return typeof l=="number"?l:(ae=(0,M.m9)(Y,Object.assign(Object.assign({},H),l)))!==null&&ae!==void 0?ae:3},[Y,l]),fe=k(Y,ie,D),ce=(0,L.Z)(X),pe=G(le,fe),[ge,Ee]=h(F),ve=r.useMemo(()=>({labelStyle:V,contentStyle:te}),[V,te]);return ge(r.createElement(I.Provider,{value:ve},r.createElement("div",Object.assign({className:O()(F,A==null?void 0:A.className,{[`${F}-${ce}`]:ce&&ce!=="default",[`${F}-bordered`]:!!u,[`${F}-rtl`]:re==="rtl"},S,b,Ee),style:Object.assign(Object.assign({},A==null?void 0:A.style),B)},ne),(o||n)&&r.createElement("div",{className:`${F}-header`},o&&r.createElement("div",{className:`${F}-title`},o),n&&r.createElement("div",{className:`${F}-extra`},n)),r.createElement("div",{className:`${F}-view`},r.createElement("table",null,r.createElement("tbody",null,pe.map((ae,me)=>r.createElement(d,{key:me,index:me,colon:i,prefixCls:F,vertical:j==="vertical",bordered:u,row:ae}))))))))};y.Item=_;var x=y},45161:function(de,Z,s){s.d(Z,{Z:function(){return z}});var r=s(79685),T=s(28120),O=s(23196),M=s(68591),J=s.n(M),L=s(99248),K=s(57196),H=g=>{const{value:d,formatter:c,precision:p,decimalSeparator:E,groupSeparator:v="",prefixCls:f}=g;let C;if(typeof c=="function")C=c(d);else{const m=String(d),h=m.match(/^(-?)(\d*)(\.(\d+))?$/);if(!h||m==="-")C=m;else{const $=h[1];let y=h[2]||"0",x=h[4]||"";y=y.replace(/\B(?=(\d{3})+(?!\d))/g,v),typeof p=="number"&&(x=x.padEnd(p,"0").slice(0,p>0?p:0)),x&&(x=`${E}${x}`),C=[r.createElement("span",{key:"int",className:`${f}-content-value-int`},$,y),x&&r.createElement("span",{key:"decimal",className:`${f}-content-value-decimal`},x)]}}return r.createElement("span",{className:`${f}-content-value`},C)},oe=s(4614),I=s(44244),Q=s(25830);const N=g=>{const{componentCls:d,marginXXS:c,padding:p,colorTextDescription:E,titleFontSize:v,colorTextHeading:f,contentFontSize:C,fontFamily:m}=g;return{[`${d}`]:Object.assign(Object.assign({},(0,oe.Wf)(g)),{[`${d}-title`]:{marginBottom:c,color:E,fontSize:v},[`${d}-skeleton`]:{paddingTop:p},[`${d}-content`]:{color:f,fontSize:C,fontFamily:m,[`${d}-content-value`]:{display:"inline-block",direction:"ltr"},[`${d}-content-prefix, ${d}-content-suffix`]:{display:"inline-block"},[`${d}-content-prefix`]:{marginInlineEnd:c},[`${d}-content-suffix`]:{marginInlineStart:c}}})}},q=g=>{const{fontSizeHeading3:d,fontSize:c}=g;return{titleFontSize:c,contentFontSize:d}};var k=(0,I.I$)("Statistic",g=>{const d=(0,Q.TS)(g,{});return[N(d)]},q),P=g=>{const{prefixCls:d,className:c,rootClassName:p,style:E,valueStyle:v,value:f=0,title:C,valueRender:m,prefix:h,suffix:$,loading:y=!1,onMouseEnter:x,onMouseLeave:e,decimalSeparator:t=".",groupSeparator:o=","}=g,{getPrefixCls:n,direction:l,statistic:i}=r.useContext(L.E_),u=n("statistic",d),[j,D]=k(u),S=r.createElement(H,Object.assign({decimalSeparator:t,groupSeparator:o,prefixCls:u},g,{value:f})),b=J()(u,{[`${u}-rtl`]:l==="rtl"},i==null?void 0:i.className,c,p,D);return j(r.createElement("div",{className:b,style:Object.assign(Object.assign({},i==null?void 0:i.style),E),onMouseEnter:x,onMouseLeave:e},C&&r.createElement("div",{className:`${u}-title`},C),r.createElement(K.Z,{paragraph:!1,loading:y,className:`${u}-skeleton`},r.createElement("div",{style:v,className:`${u}-content`},h&&r.createElement("span",{className:`${u}-content-prefix`},h),m?m(S):S,$&&r.createElement("span",{className:`${u}-content-suffix`},$)))))};const ue=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function G(g,d){let c=g;const p=/\[[^\]]*]/g,E=(d.match(p)||[]).map(m=>m.slice(1,-1)),v=d.replace(p,"[]"),f=ue.reduce((m,h)=>{let[$,y]=h;if(m.includes($)){const x=Math.floor(c/y);return c-=x*y,m.replace(new RegExp(`${$}+`,"g"),e=>{const t=e.length;return x.toString().padStart(t,"0")})}return m},v);let C=0;return f.replace(p,()=>{const m=E[C];return C+=1,m})}function U(g,d){const{format:c=""}=d,p=new Date(g).getTime(),E=Date.now(),v=Math.max(p-E,0);return G(v,c)}const _=1e3/30;function R(g){return new Date(g).getTime()}const ee=g=>{const{value:d,format:c="HH:mm:ss",onChange:p,onFinish:E}=g,v=(0,T.Z)(),f=r.useRef(null),C=()=>{E==null||E(),f.current&&(clearInterval(f.current),f.current=null)},m=()=>{const y=R(d);y>=Date.now()&&(f.current=setInterval(()=>{v(),p==null||p(y-Date.now()),y<Date.now()&&C()},_))};r.useEffect(()=>(m(),()=>{f.current&&(clearInterval(f.current),f.current=null)}),[d]);const h=(y,x)=>U(y,Object.assign(Object.assign({},x),{format:c})),$=y=>(0,O.Tm)(y,{title:void 0});return r.createElement(P,Object.assign({},g,{valueRender:$,formatter:h}))};var a=r.memo(ee);P.Countdown=a;var z=P}}]);
|
|
|