mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-13 19:02:51 +00:00
1 line
12 KiB
JavaScript
1 line
12 KiB
JavaScript
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[3797],{72547:function(e,t,n){n.d(t,{Z:function(){return o}});const o=e=>e?"function"==typeof e?e():e:null},33797:function(e,t,n){n.d(t,{Z:function(){return P}});var o=n(44194),r=n(51865),i=n.n(r),a=n(20488),l=n(65489),s=n(28440),c=n(31246),d=n(1648),p=n(64357),u=n(48406);var g=o.createContext({}),m=n(59199),f=n(54184),v=n(51858),b=n(77167);const y=e=>{const{antCls:t,componentCls:n,iconCls:o,avatarBg:r,avatarColor:i,containerSize:a,containerSizeLG:l,containerSizeSM:s,textFontSize:c,textFontSizeLG:d,textFontSizeSM:p,iconFontSize:u,iconFontSizeLG:g,iconFontSizeSM:v,borderRadius:b,borderRadiusLG:y,borderRadiusSM:h,lineWidth:x,lineType:O}=e,S=(e,t,r,i)=>({width:e,height:e,borderRadius:"50%",fontSize:t,[`&${n}-square`]:{borderRadius:i},[`&${n}-icon`]:{fontSize:r,[`> ${o}`]:{margin:0}}});return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,f.Wf)(e)),{position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"hidden",color:i,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:r,border:`${(0,m.bf)(x)} ${O} transparent`,"&-image":{background:"transparent"},[`${t}-image-img`]:{display:"block"}}),S(a,c,u,b)),{"&-lg":Object.assign({},S(l,d,g,y)),"&-sm":Object.assign({},S(s,p,v,h)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},h=e=>{const{componentCls:t,groupBorderColor:n,groupOverlapping:o,groupSpace:r}=e;return{[`${t}-group`]:{display:"inline-flex",[t]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:o}},[`${t}-group-popover`]:{[`${t} + ${t}`]:{marginInlineStart:r}}}};var x=(0,v.I$)("Avatar",(e=>{const{colorTextLightSolid:t,colorTextPlaceholder:n}=e,o=(0,b.IX)(e,{avatarBg:n,avatarColor:t});return[y(o),h(o)]}),(e=>{const{controlHeight:t,controlHeightLG:n,controlHeightSM:o,fontSize:r,fontSizeLG:i,fontSizeXL:a,fontSizeHeading3:l,marginXS:s,marginXXS:c,colorBorderBg:d}=e;return{containerSize:t,containerSizeLG:n,containerSizeSM:o,textFontSize:r,textFontSizeLG:r,textFontSizeSM:r,iconFontSize:Math.round((i+a)/2),iconFontSizeLG:l,iconFontSizeSM:r,groupSpace:c,groupOverlapping:-s,groupBorderColor:d}})),O=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const S=o.forwardRef(((e,t)=>{const{prefixCls:n,shape:r,size:m,src:f,srcSet:v,icon:b,className:y,rootClassName:h,style:S,alt:C,draggable:$,children:j,crossOrigin:z,gap:E=4,onError:w}=e,N=O(e,["prefixCls","shape","size","src","srcSet","icon","className","rootClassName","style","alt","draggable","children","crossOrigin","gap","onError"]),[P,k]=o.useState(1),[Z,B]=o.useState(!1),[W,M]=o.useState(!0),I=o.useRef(null),L=o.useRef(null),F=(0,l.sQ)(t,I),{getPrefixCls:R,avatar:G}=o.useContext(c.E_),T=o.useContext(g),D=()=>{if(!L.current||!I.current)return;const e=L.current.offsetWidth,t=I.current.offsetWidth;0!==e&&0!==t&&2*E<t&&k(t-2*E<e?(t-2*E)/e:1)};o.useEffect((()=>{B(!0)}),[]),o.useEffect((()=>{M(!0),k(1)}),[f]),o.useEffect(D,[E]);const H=()=>{!1!==(null==w?void 0:w())&&M(!1)},_=(0,p.Z)((e=>{var t,n;return null!==(n=null!==(t=null!=m?m:null==T?void 0:T.size)&&void 0!==t?t:e)&&void 0!==n?n:"default"})),V=Object.keys("object"==typeof _&&_||{}).some((e=>["xs","sm","md","lg","xl","xxl"].includes(e))),X=(0,u.Z)(V),A=o.useMemo((()=>{if("object"!=typeof _)return{};const e=s.c4.find((e=>X[e])),t=_[e];return t?{width:t,height:t,fontSize:t&&(b||j)?t/2:18}:{}}),[X,_,b,j]);const K=R("avatar",n),q=(0,d.Z)(K),[Q,U,Y]=x(K,q),J=i()({[`${K}-lg`]:"large"===_,[`${K}-sm`]:"small"===_}),ee=o.isValidElement(f),te=r||(null==T?void 0:T.shape)||"circle",ne=i()(K,J,null==G?void 0:G.className,`${K}-${te}`,{[`${K}-image`]:ee||f&&W,[`${K}-icon`]:!!b},Y,q,y,h,U),oe="number"==typeof _?{width:_,height:_,fontSize:b?_/2:18}:{};let re;if("string"==typeof f&&W)re=o.createElement("img",{src:f,draggable:$,srcSet:v,onError:H,alt:C,crossOrigin:z});else if(ee)re=f;else if(b)re=b;else if(Z||1!==P){const e=`scale(${P})`,t={msTransform:e,WebkitTransform:e,transform:e};re=o.createElement(a.Z,{onResize:D},o.createElement("span",{className:`${K}-string`,ref:L,style:t},j))}else re=o.createElement("span",{className:`${K}-string`,style:{opacity:0},ref:L},j);return Q(o.createElement("span",Object.assign({},N,{style:Object.assign(Object.assign(Object.assign(Object.assign({},oe),A),null==G?void 0:G.style),S),className:ne,ref:F}),re))}));var C=S,$=n(54387),j=n(31599),z=n(63924);const E=e=>{const{size:t,shape:n}=o.useContext(g),r=o.useMemo((()=>({size:e.size||t,shape:e.shape||n})),[e.size,e.shape,t,n]);return o.createElement(g.Provider,{value:r},e.children)};var w=e=>{var t,n,r,a;const{getPrefixCls:l,direction:s}=o.useContext(c.E_),{prefixCls:p,className:u,rootClassName:g,style:m,maxCount:f,maxStyle:v,size:b,shape:y,maxPopoverPlacement:h,maxPopoverTrigger:O,children:S,max:w}=e;const N=l("avatar",p),P=`${N}-group`,k=(0,d.Z)(N),[Z,B,W]=x(N,k),M=i()(P,{[`${P}-rtl`]:"rtl"===s},W,k,u,g,B),I=(0,$.Z)(S).map(((e,t)=>(0,j.Tm)(e,{key:`avatar-key-${t}`}))),L=(null==w?void 0:w.count)||f,F=I.length;if(L&&L<F){const e=I.slice(0,L),l=I.slice(L,F),s=(null==w?void 0:w.style)||v,c=(null===(t=null==w?void 0:w.popover)||void 0===t?void 0:t.trigger)||O||"hover",d=(null===(n=null==w?void 0:w.popover)||void 0===n?void 0:n.placement)||h||"top",p=Object.assign(Object.assign({content:l},null==w?void 0:w.popover),{classNames:{root:i()(`${P}-popover`,null===(a=null===(r=null==w?void 0:w.popover)||void 0===r?void 0:r.classNames)||void 0===a?void 0:a.root)},placement:d,trigger:c});return e.push(o.createElement(z.Z,Object.assign({key:"avatar-popover-key",destroyOnHidden:!0},p),o.createElement(C,{style:s},"+"+(F-L)))),Z(o.createElement(E,{shape:y,size:b},o.createElement("div",{className:M,style:m},e)))}return Z(o.createElement(E,{shape:y,size:b},o.createElement("div",{className:M,style:m},I)))};const N=C;N.Group=w;var P=N},98820:function(e,t,n){n.d(t,{aV:function(){return p}});var o=n(44194),r=n(51865),i=n.n(r),a=n(74114),l=n(72547),s=n(31246),c=n(71314),d=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const p=({title:e,content:t,prefixCls:n})=>e||t?o.createElement(o.Fragment,null,e&&o.createElement("div",{className:`${n}-title`},e),t&&o.createElement("div",{className:`${n}-inner-content`},t)):null,u=e=>{const{hashId:t,prefixCls:n,className:r,style:s,placement:c="top",title:d,content:u,children:g}=e,m=(0,l.Z)(d),f=(0,l.Z)(u),v=i()(t,n,`${n}-pure`,`${n}-placement-${c}`,r);return o.createElement("div",{className:v,style:s},o.createElement("div",{className:`${n}-arrow`}),o.createElement(a.G,Object.assign({},e,{className:t,prefixCls:n}),g||o.createElement(p,{prefixCls:n,title:m,content:f})))};t.ZP=e=>{const{prefixCls:t,className:n}=e,r=d(e,["prefixCls","className"]),{getPrefixCls:a}=o.useContext(s.E_),l=a("popover",t),[p,g,m]=(0,c.Z)(l);return p(o.createElement(u,Object.assign({},r,{prefixCls:l,hashId:g,className:i()(n,m)})))}},63924:function(e,t,n){var o=n(44194),r=n(51865),i=n.n(r),a=n(81424),l=n(46748),s=n(72547),c=n(72073),d=n(31599),p=n(31246),u=n(78578),g=n(98820),m=n(71314),f=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const v=o.forwardRef(((e,t)=>{var n,r;const{prefixCls:v,title:b,content:y,overlayClassName:h,placement:x="top",trigger:O="hover",children:S,mouseEnterDelay:C=.1,mouseLeaveDelay:$=.1,onOpenChange:j,overlayStyle:z={},styles:E,classNames:w}=e,N=f(e,["prefixCls","title","content","overlayClassName","placement","trigger","children","mouseEnterDelay","mouseLeaveDelay","onOpenChange","overlayStyle","styles","classNames"]),{getPrefixCls:P,className:k,style:Z,classNames:B,styles:W}=(0,p.dj)("popover"),M=P("popover",v),[I,L,F]=(0,m.Z)(M),R=P(),G=i()(h,L,F,k,B.root,null==w?void 0:w.root),T=i()(B.body,null==w?void 0:w.body),[D,H]=(0,a.Z)(!1,{value:null!==(n=e.open)&&void 0!==n?n:e.visible,defaultValue:null!==(r=e.defaultOpen)&&void 0!==r?r:e.defaultVisible}),_=(e,t)=>{H(e,!0),null==j||j(e,t)},V=(0,s.Z)(b),X=(0,s.Z)(y);return I(o.createElement(u.Z,Object.assign({placement:x,trigger:O,mouseEnterDelay:C,mouseLeaveDelay:$},N,{prefixCls:M,classNames:{root:G,body:T},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign({},W.root),Z),z),null==E?void 0:E.root),body:Object.assign(Object.assign({},W.body),null==E?void 0:E.body)},ref:t,open:D,onOpenChange:e=>{_(e)},overlay:V||X?o.createElement(g.aV,{prefixCls:M,title:V,content:X}):null,transitionName:(0,c.m)(R,"zoom-big",N.transitionName),"data-popover-inject":!0}),(0,d.Tm)(S,{onKeyDown:e=>{var t,n;(0,o.isValidElement)(S)&&(null===(n=null==S?void 0:(t=S.props).onKeyDown)||void 0===n||n.call(t,e)),(e=>{e.keyCode===l.Z.ESC&&_(!1,e)})(e)}})))}));v._InternalPanelDoNotUseOrYouWillBeFired=g.ZP,t.Z=v},71314:function(e,t,n){var o=n(54184),r=n(96898),i=n(12901),a=n(45998),l=n(33990),s=n(51858),c=n(77167);const d=e=>{const{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:a,innerPadding:l,boxShadowSecondary:s,colorTextHeading:c,borderRadiusLG:d,zIndexPopup:p,titleMarginBottom:u,colorBgElevated:g,popoverBg:m,titleBorderBottom:f,innerContentPadding:v,titlePadding:b}=e;return[{[t]:Object.assign(Object.assign({},(0,o.Wf)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:p,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"--antd-arrow-background-color":g,width:"max-content",maxWidth:"100vw","&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${t}-content`]:{position:"relative"},[`${t}-inner`]:{backgroundColor:m,backgroundClip:"padding-box",borderRadius:d,boxShadow:s,padding:l},[`${t}-title`]:{minWidth:r,marginBottom:u,color:c,fontWeight:a,borderBottom:f,padding:b},[`${t}-inner-content`]:{color:n,padding:v}})},(0,i.ZP)(e,"var(--antd-arrow-background-color)"),{[`${t}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${t}-content`]:{display:"inline-block"}}}]},p=e=>{const{componentCls:t}=e;return{[t]:l.i.map((n=>{const o=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":o,[`${t}-inner`]:{backgroundColor:o},[`${t}-arrow`]:{background:"transparent"}}}}))}};t.Z=(0,s.I$)("Popover",(e=>{const{colorBgElevated:t,colorText:n}=e,o=(0,c.IX)(e,{popoverBg:t,popoverColor:n});return[d(o),p(o),(0,r._y)(o,"zoom-big")]}),(e=>{const{lineWidth:t,controlHeight:n,fontHeight:o,padding:r,wireframe:l,zIndexPopupBase:s,borderRadiusLG:c,marginXS:d,lineType:p,colorSplit:u,paddingSM:g}=e,m=n-o,f=m/2,v=m/2-t,b=r;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:s+30},(0,a.w)(e)),(0,i.wZ)({contentRadius:c,limitVerticalRadius:!0})),{innerPadding:l?0:12,titleMarginBottom:l?0:d,titlePadding:l?`${f}px ${b}px ${v}px`:0,titleBorderBottom:l?`${t}px ${p} ${u}`:"none",innerContentPadding:l?`${g}px ${b}px`:0})}),{resetStyle:!1,deprecatedTokens:[["width","titleMinWidth"],["minWidth","titleMinWidth"]]})}}]); |