Files
shz-admin/shihezi/8703.34342787.async.js

3 lines
18 KiB
JavaScript
Raw Permalink Normal View History

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[8703],{38703:function(ct,ve,m){m.d(ve,{Z:function(){return it}});var s=m(67294),he=m(15063),ye=m(89739),Ce=m(63606),Se=m(4340),$e=m(97937),be=m(93967),A=m.n(be),ke=m(98423),xe=m(53124),ne=m(87462),U=m(1413),oe=m(91),se={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},ie=function(){var t=(0,s.useRef)([]),r=(0,s.useRef)(null);return(0,s.useEffect)(function(){var n=Date.now(),o=!1;t.current.forEach(function(l){if(l){o=!0;var i=l.style;i.transitionDuration=".3s, .3s, .3s, .06s",r.current&&n-r.current<100&&(i.transitionDuration="0s, 0s")}}),o&&(r.current=Date.now())}),t.current},Pe=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Ee=function(t){var r=(0,U.Z)((0,U.Z)({},se),t),n=r.className,o=r.percent,l=r.prefixCls,i=r.strokeColor,c=r.strokeLinecap,a=r.strokeWidth,f=r.style,d=r.trailColor,p=r.trailWidth,v=r.transition,S=(0,oe.Z)(r,Pe);delete S.gapPosition;var y=Array.isArray(o)?o:[o],C=Array.isArray(i)?i:[i],x=ie(),g=a/2,h=100-a/2,O="M ".concat(c==="round"?g:0,",").concat(g,`
L `).concat(c==="round"?h:100,",").concat(g),E="0 0 100 ".concat(a),$=0;return s.createElement("svg",(0,ne.Z)({className:A()("".concat(l,"-line"),n),viewBox:E,preserveAspectRatio:"none",style:f},S),s.createElement("path",{className:"".concat(l,"-line-trail"),d:O,strokeLinecap:c,stroke:d,strokeWidth:p||a,fillOpacity:"0"}),y.map(function(b,P){var k=1;switch(c){case"round":k=1-a/100;break;case"square":k=1-a/2/100;break;default:k=1;break}var I={strokeDasharray:"".concat(b*k,"px, 100px"),strokeDashoffset:"-".concat($,"px"),transition:v||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},u=C[P]||C[C.length-1];return $+=b,s.createElement("path",{key:P,className:"".concat(l,"-line-path"),d:O,strokeLinecap:c,stroke:u,strokeWidth:a,fillOpacity:"0",ref:function(M){x[P]=M},style:I})}))},Ie=Ee,X=m(71002),Oe=m(97685),Le=m(98924),ae=0,je=(0,Le.Z)();function We(){var e;return je?(e=ae,ae+=1):e="TEST_OR_SSR",e}var we=function(e){var t=s.useState(),r=(0,Oe.Z)(t,2),n=r[0],o=r[1];return s.useEffect(function(){o("rc_progress_".concat(We()))},[]),e||n},ce=function(t){var r=t.bg,n=t.children;return s.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function le(e,t){return Object.keys(e).map(function(r){var n=parseFloat(r),o="".concat(Math.floor(n*t),"%");return"".concat(e[r]," ").concat(o)})}var Ne=s.forwardRef(function(e,t){var r=e.prefixCls,n=e.color,o=e.gradientId,l=e.radius,i=e.style,c=e.ptg,a=e.strokeLinecap,f=e.strokeWidth,d=e.size,p=e.gapDegree,v=n&&(0,X.Z)(n)==="object",S=v?"#FFF":void 0,y=d/2,C=s.createElement("circle",{className:"".concat(r,"-circle-path"),r:l,cx:y,cy:y,stroke:S,strokeLinecap:a,strokeWidth:f,opacity:c===0?0:1,style:i,ref:t});if(!v)return C;var x="".concat(o,"-conic"),g=p?"".concat(180+p/2,"deg"):"0deg",h=le(n,(360-p)/360),O=le(n,1),E="conic-gradient(from ".concat(g,", ").concat(h.join(", "),")"),$="linear-gradient(to ".concat(p?"bottom":"top",", ").concat(O.join(", "),")");return s.createElement(s.Fragment,null,s.createElement("mask",{id:x},C),s.createElement("foreignObject",{x:0,y:0,width:d,height:d,mask:"url(#".concat(x,")")},s.createElement(ce,{bg:$},s.createElement(ce,{bg:E}))))}),Ae=Ne,G=100,_=function(t,r,n,o,l,i,c,a,f,d){var p=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,v=n/100*360*((360-i)/360),S=i===0?0:{bottom:0,top:180,left:90,right:-90}[c],y=(100-o)/100*r;f==="round"&&o!==100&&(y+=d/2,y>=r&&(y=r-.01));var C=G/2;return{stroke:typeof a=="string"?a:void 0,strokeDasharray:"".concat(r,"px ").concat(t),strokeDashoffset:y+p,transform:"rotate(".concat(l+v+S,"deg)"),transformOrigin:"".concat(C,"px ").concat(C,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},De=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function de(e){var t=e!=null?e:[];return Array.isArray(t)?t:[t]}var Te=function(t){var r=(0,U.Z)((0,U.Z)({},se),t),n=r.id,o=r.prefixCls,l=r.steps,i=r.strokeWidth,c=r.trailWidth,a=r.gapDegree,f=a===void 0?0:a,d=r.gapPosition,p=r.trailColor,v=r.strokeLinecap,S=r.style,y=r.className,C=r.strokeColor,x=r.percent,g=(0,oe.Z)(r,De),h=G/2,O=we(n),E="".concat(O,"-gradient"),$=h-i/2,b=Math.PI*2*$,P=f>0?90+f/2:-90,k=b*((360-f)/360),I=(0,X.Z)(l)==="object"?l:{count:l,gap:2},u=I.count,H=I.gap,M=de(x),D=de(C),T=D.find(function(j){return j&&(0,X.Z)(j)==="object"}),Z=T&&(0,X.Z)(T)==="object",N=Z?"butt":v,V=_(b,k,0,100,P,f,d,p,N,i),J=ie(),W=function(){var B=0;return M.map(function(R,F){var te=D[F]||D[D.length-1],K=_(b,k,B,R,P,f,d,te,N,i);return B+=R,s.createElement(Ae,{key:F,color:te,ptg:R,radius:$,prefixCls:o,gradientId:E,style:K,strokeLinecap:N,strokeWidth:i,gapDegree:f,ref:function(re){J[F]=re},size:G})}).reverse()},L=function(){var B=Math.round(u*(M[0]/100)),R=100/u,F=0;return new Array(u).fill(null).map(function(te,K){var q=K<=B-1?D[0]:p,re=q&&(0,X.Z)(q)==="object"?"url(#".concat(E,")"):void 0,me=_(b,k,F,R,P,f,d,q,"butt",i,H);return