打包前端

This commit is contained in:
liu
2026-09-16 23:53:05 +08:00
parent 751e8a196c
commit e4ba90bbbb
289 changed files with 946 additions and 1021 deletions
+1
View File
@@ -0,0 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Ct as t,Et as n,Hn as r,Ot as i,Pr as a,Qn as o,Wn as s,en as c,jr as l,qt as u,rr as d,st as f,wn as p,wt as m}from"./jsx-runtime-Dk2XcqH2.js";import{n as h}from"./PlusOutlined-B7_Swmw6.js";var g=e(a()),_=e=>{let{value:t,formatter:r,precision:a,decimalSeparator:o,groupSeparator:s=``,prefixCls:c,className:l,style:u}=e,d;if(n(r))d=r(t);else{let e=String(t),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(!n||e===`-`)d=e;else{let e=n[1],t=n[2]||`0`,r=n[4]||``;t=t.replace(/\B(?=(\d{3})+(?!\d))/g,s),i(a)&&(r=r.padEnd(a,`0`).slice(0,a>0?a:0)),r&&=`${o}${r}`,d=[g.createElement(`span`,{key:`int`,className:`${c}-content-value-int`},e,t),r&&g.createElement(`span`,{key:`decimal`,className:`${c}-content-value-decimal`},r)]}}return g.createElement(`span`,{className:l,style:u},d)},v=e=>{let{componentCls:t,marginXXS:n,padding:r,colorTextDescription:i,titleFontSize:a,colorTextHeading:o,contentFontSize:s,fontFamily:l}=e;return{[t]:{...c(e),[`${t}-header`]:{paddingBottom:n,[`${t}-title`]:{color:i,fontSize:a}},[`${t}-skeleton`]:{paddingTop:r},[`${t}-content`]:{color:o,fontSize:s,fontFamily:l,[`${t}-content-value`]:{display:`inline-block`,direction:`ltr`},[`${t}-content-prefix, ${t}-content-suffix`]:{display:`inline-block`},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}}}},y=u(`Statistic`,e=>v(p(e,{})),e=>{let{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}),b=g.forwardRef((e,i)=>{let{prefixCls:a,className:c,rootClassName:l,style:u,valueStyle:f,value:p=0,title:v,valueRender:b,prefix:x,suffix:S,loading:C=!1,formatter:w,precision:T,decimalSeparator:E=`.`,groupSeparator:D=`,`,onMouseEnter:O,onMouseLeave:k,styles:A,classNames:j,...M}=e,{getPrefixCls:N,direction:P,className:F,style:I,classNames:L,styles:R}=r(`statistic`),z=N(`statistic`,a),[B,V]=y(z),H={...e,decimalSeparator:E,groupSeparator:D,loading:C,value:p},U=m(I),W=m(u),[G,K]=t([L,j],[R,U,A,W],{props:H}),q=s(z,{[`${z}-rtl`]:P===`rtl`},F,c,l,G.root,B,V),J=s(`${z}-header`,G.header),Y=s(`${z}-title`,G.title),X=s(`${z}-content`,G.content),Z=s(`${z}-content-value`,G.value),ee=s(`${z}-content-prefix`,G.prefix),te=s(`${z}-content-suffix`,G.suffix),Q=g.createElement(_,{decimalSeparator:E,groupSeparator:D,prefixCls:z,formatter:w,precision:T,value:p,className:Z,style:K.value}),$=g.useRef(null);g.useImperativeHandle(i,()=>({nativeElement:$.current}));let ne=o(M,{aria:!0,data:!0});return g.createElement(`div`,{...ne,className:q,style:K.root,ref:$,onMouseEnter:O,onMouseLeave:k},d(v)&&g.createElement(`div`,{className:J,style:K.header},g.createElement(`div`,{className:Y,style:K.title},v)),g.createElement(h,{paragraph:!1,loading:C,className:`${z}-skeleton`,active:!0},g.createElement(`div`,{className:X,style:{...f,...K.content}},d(x)&&g.createElement(`span`,{className:ee,style:K.prefix},x),n(b)?b(Q):Q,d(S)&&g.createElement(`span`,{className:te,style:K.suffix},S))))}),x=[[`Y`,31536e6],[`M`,2592e6],[`D`,864e5],[`H`,36e5],[`m`,6e4],[`s`,1e3],[`S`,1]];function S(e,t){let n=e,r=/\[[^\]]*]/g,i=(t.match(r)||[]).map(e=>e.slice(1,-1)),a=t.replace(r,`[]`),o=x.reduce((e,[t,r])=>{if(e.includes(t)){let i=Math.floor(n/r);return n-=i*r,e.replace(RegExp(`${t}+`,`g`),e=>{let t=e.length;return i.toString().padStart(t,`0`)})}return e},a),s=0;return o.replace(r,()=>{let e=i[s];return s+=1,e})}function C(e,t,n){let{format:r=``}=t,i=new Date(e).getTime(),a=Date.now();return S(Math.max(n?i-a:a-i,0),r)}var w=1e3/60;function T(e){return new Date(e).getTime()}var E=e=>{let{value:t,format:n=`HH:mm:ss`,onChange:r,onFinish:i,type:a,...o}=e,s=a===`countdown`,[c,u]=g.useState(null),d=l(()=>{let e=Date.now(),n=T(t);u({});let a=s?n-e:e-n;return r?.(a),s&&n<e?(i?.(),!1):!0});g.useEffect(()=>{let e,t=()=>{d()||window.clearInterval(e)},n=()=>{e=window.setInterval(t,w)},r=()=>{window.clearInterval(e)};return n(),()=>{r()}},[t,s]),g.useEffect(()=>{u({})},[]);let p=(e,t)=>c?C(e,{...t,format:n},s):`-`,m=e=>f(e,{title:void 0});return g.createElement(b,{...o,value:t,valueRender:m,formatter:p})},D=g.memo(e=>g.createElement(E,{...e,type:`countdown`}));b.Timer=E,b.Countdown=D;var O=b;export{O as t};