mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-14 19:27:53 +00:00
1 line
11 KiB
JavaScript
1 line
11 KiB
JavaScript
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[2673],{62673:function(e,t,a){a.d(t,{Z:function(){return T}});var n=a(44194),r=a(51865),o=a.n(r),i=a(97859),l=a(37167),d=a(1273),s=a(10987),c=a(8247),b=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]])}return a};var g=e=>{var{prefixCls:t,className:a,hoverable:r=!0}=e,i=b(e,["prefixCls","className","hoverable"]);const{getPrefixCls:d}=n.useContext(l.E_),s=d("card",t),c=o()(`${s}-grid`,a,{[`${s}-grid-hoverable`]:r});return n.createElement("div",Object.assign({},i,{className:c}))},p=a(47825),m=a(88874),h=a(65759),f=a(77167);const $=e=>{const{antCls:t,componentCls:a,headerHeight:n,headerPadding:r,tabsMarginBottom:o}=e;return Object.assign(Object.assign({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:n,marginBottom:-1,padding:`0 ${(0,p.bf)(r)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,p.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,p.bf)(e.borderRadiusLG)} ${(0,p.bf)(e.borderRadiusLG)} 0 0`},(0,m.dF)()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":Object.assign(Object.assign({display:"inline-block",flex:1},m.vS),{[`\n > ${a}-typography,\n > ${a}-typography-edit-content\n `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${t}-tabs-top`]:{clear:"both",marginBottom:o,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,p.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}})},u=e=>{const{cardPaddingBase:t,colorBorderSecondary:a,cardShadow:n,lineWidth:r}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`\n ${(0,p.bf)(r)} 0 0 0 ${a},\n 0 ${(0,p.bf)(r)} 0 0 ${a},\n ${(0,p.bf)(r)} ${(0,p.bf)(r)} 0 0 ${a},\n ${(0,p.bf)(r)} 0 0 0 ${a} inset,\n 0 ${(0,p.bf)(r)} 0 0 ${a} inset;\n `,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:n}}},y=e=>{const{componentCls:t,iconCls:a,actionsLiMargin:n,cardActionsIconSize:r,colorBorderSecondary:o,actionsBg:i}=e;return Object.assign(Object.assign({margin:0,padding:0,listStyle:"none",background:i,borderTop:`${(0,p.bf)(e.lineWidth)} ${e.lineType} ${o}`,display:"flex",borderRadius:`0 0 ${(0,p.bf)(e.borderRadiusLG)} ${(0,p.bf)(e.borderRadiusLG)}`},(0,m.dF)()),{"& > li":{margin:n,color:e.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:e.calc(e.cardActionsIconSize).mul(2).equal(),fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer","&:hover":{color:e.colorPrimary,transition:`color ${e.motionDurationMid}`},[`a:not(${t}-btn), > ${a}`]:{display:"inline-block",width:"100%",color:e.colorTextDescription,lineHeight:(0,p.bf)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${a}`]:{fontSize:r,lineHeight:(0,p.bf)(e.calc(r).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,p.bf)(e.lineWidth)} ${e.lineType} ${o}`}}})},v=e=>Object.assign(Object.assign({margin:`${(0,p.bf)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex"},(0,m.dF)()),{"&-avatar":{paddingInlineEnd:e.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":Object.assign({color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG},m.vS),"&-description":{color:e.colorTextDescription}}),S=e=>{const{componentCls:t,colorFillAlter:a,headerPadding:n,bodyPadding:r}=e;return{[`${t}-head`]:{padding:`0 ${(0,p.bf)(n)}`,background:a,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,p.bf)(e.padding)} ${(0,p.bf)(r)}`}}},x=e=>{const{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}},O=e=>{const{componentCls:t,cardShadow:a,cardHeadPadding:n,colorBorderSecondary:r,boxShadowTertiary:o,bodyPadding:i,extraColor:l}=e;return{[t]:Object.assign(Object.assign({},(0,m.Wf)(e)),{position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:o},[`${t}-head`]:$(e),[`${t}-extra`]:{marginInlineStart:"auto",color:l,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:Object.assign({padding:i,borderRadius:`0 0 ${(0,p.bf)(e.borderRadiusLG)} ${(0,p.bf)(e.borderRadiusLG)}`},(0,m.dF)()),[`${t}-grid`]:u(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,p.bf)(e.borderRadiusLG)} ${(0,p.bf)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:y(e),[`${t}-meta`]:v(e)}),[`${t}-bordered`]:{border:`${(0,p.bf)(e.lineWidth)} ${e.lineType} ${r}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${e.motionDurationMid}, border-color ${e.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:a}},[`${t}-contain-grid`]:{borderRadius:`${(0,p.bf)(e.borderRadiusLG)} ${(0,p.bf)(e.borderRadiusLG)} 0 0 `,[`${t}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${t}-loading) ${t}-body`]:{marginBlockStart:e.calc(e.lineWidth).mul(-1).equal(),marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),padding:0}},[`${t}-contain-tabs`]:{[`> div${t}-head`]:{minHeight:0,[`${t}-head-title, ${t}-extra`]:{paddingTop:n}}},[`${t}-type-inner`]:S(e),[`${t}-loading`]:x(e),[`${t}-rtl`]:{direction:"rtl"}}},C=e=>{const{componentCls:t,bodyPaddingSM:a,headerPaddingSM:n,headerHeightSM:r,headerFontSizeSM:o}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:r,padding:`0 ${(0,p.bf)(n)}`,fontSize:o,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:a}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}};var j=(0,h.I$)("Card",(e=>{const t=(0,f.IX)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[O(t),C(t)]}),(e=>{var t,a;return{headerBg:"transparent",headerFontSize:e.fontSizeLG,headerFontSizeSM:e.fontSize,headerHeight:e.fontSizeLG*e.lineHeightLG+2*e.padding,headerHeightSM:e.fontSize*e.lineHeight+2*e.paddingXS,actionsBg:e.colorBgContainer,actionsLiMargin:`${e.paddingSM}px 0`,tabsMarginBottom:-e.padding-e.lineWidth,extraColor:e.colorText,bodyPaddingSM:12,headerPaddingSM:12,bodyPadding:null!==(t=e.bodyPadding)&&void 0!==t?t:e.paddingLG,headerPadding:null!==(a=e.headerPadding)&&void 0!==a?a:e.paddingLG}})),w=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]])}return a};const E=e=>{const{actionClasses:t,actions:a=[],actionStyle:r}=e;return n.createElement("ul",{className:t,style:r},a.map(((e,t)=>{const r=`action-${t}`;return n.createElement("li",{style:{width:100/a.length+"%"},key:r},n.createElement("span",null,e))})))},P=n.forwardRef(((e,t)=>{const{prefixCls:a,className:r,rootClassName:b,style:p,extra:m,headStyle:h={},bodyStyle:f={},title:$,loading:u,bordered:y=!0,size:v,type:S,cover:x,actions:O,tabList:C,children:P,activeTabKey:z,defaultActiveTabKey:N,tabBarExtraContent:B,hoverable:T,tabProps:L={},classNames:M,styles:G}=e,H=w(e,["prefixCls","className","rootClassName","style","extra","headStyle","bodyStyle","title","loading","bordered","size","type","cover","actions","tabList","children","activeTabKey","defaultActiveTabKey","tabBarExtraContent","hoverable","tabProps","classNames","styles"]),{getPrefixCls:R,direction:I,card:W}=n.useContext(l.E_);const k=e=>{var t;return o()(null===(t=null==W?void 0:W.classNames)||void 0===t?void 0:t[e],null==M?void 0:M[e])},D=e=>{var t;return Object.assign(Object.assign({},null===(t=null==W?void 0:W.styles)||void 0===t?void 0:t[e]),null==G?void 0:G[e])},F=n.useMemo((()=>{let e=!1;return n.Children.forEach(P,(t=>{(null==t?void 0:t.type)===g&&(e=!0)})),e}),[P]),A=R("card",a),[K,q,X]=j(A),Z=n.createElement(s.Z,{loading:!0,active:!0,paragraph:{rows:4},title:!1},P),_=void 0!==z,J=Object.assign(Object.assign({},L),{[_?"activeKey":"defaultActiveKey"]:_?z:N,tabBarExtraContent:B});let Q;const U=(0,d.Z)(v),V=U&&"default"!==U?U:"large",Y=C?n.createElement(c.Z,Object.assign({size:V},J,{className:`${A}-head-tabs`,onChange:t=>{var a;null===(a=e.onTabChange)||void 0===a||a.call(e,t)},items:C.map((e=>{var{tab:t}=e,a=w(e,["tab"]);return Object.assign({label:t},a)}))})):null;if($||m||Y){const e=o()(`${A}-head`,k("header")),t=o()(`${A}-head-title`,k("title")),a=o()(`${A}-extra`,k("extra")),r=Object.assign(Object.assign({},h),D("header"));Q=n.createElement("div",{className:e,style:r},n.createElement("div",{className:`${A}-head-wrapper`},$&&n.createElement("div",{className:t,style:D("title")},$),m&&n.createElement("div",{className:a,style:D("extra")},m)),Y)}const ee=o()(`${A}-cover`,k("cover")),te=x?n.createElement("div",{className:ee,style:D("cover")},x):null,ae=o()(`${A}-body`,k("body")),ne=Object.assign(Object.assign({},f),D("body")),re=n.createElement("div",{className:ae,style:ne},u?Z:P),oe=o()(`${A}-actions`,k("actions")),ie=(null==O?void 0:O.length)?n.createElement(E,{actionClasses:oe,actionStyle:D("actions"),actions:O}):null,le=(0,i.Z)(H,["onTabChange"]),de=o()(A,null==W?void 0:W.className,{[`${A}-loading`]:u,[`${A}-bordered`]:y,[`${A}-hoverable`]:T,[`${A}-contain-grid`]:F,[`${A}-contain-tabs`]:null==C?void 0:C.length,[`${A}-${U}`]:U,[`${A}-type-${S}`]:!!S,[`${A}-rtl`]:"rtl"===I},r,b,q,X),se=Object.assign(Object.assign({},null==W?void 0:W.style),p);return K(n.createElement("div",Object.assign({ref:t},le,{className:de,style:se}),Q,te,re,ie))}));var z=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]])}return a};var N=e=>{const{prefixCls:t,className:a,avatar:r,title:i,description:d}=e,s=z(e,["prefixCls","className","avatar","title","description"]),{getPrefixCls:c}=n.useContext(l.E_),b=c("card",t),g=o()(`${b}-meta`,a),p=r?n.createElement("div",{className:`${b}-meta-avatar`},r):null,m=i?n.createElement("div",{className:`${b}-meta-title`},i):null,h=d?n.createElement("div",{className:`${b}-meta-description`},d):null,f=m||h?n.createElement("div",{className:`${b}-meta-detail`},m,h):null;return n.createElement("div",Object.assign({},s,{className:g}),p,f)};const B=P;B.Grid=g,B.Meta=N;var T=B}}]); |