👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
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.
 
 
 

10 lines
15 KiB

(globalThis.utooChunk_ant_design_pro||(globalThis.utooChunk_ant_design_pro=[])).push(["object"==typeof document?document.currentScript:void 0,98826,e=>{"use strict";var t=e.i(353944);e.i(191788);var i=e.i(391398);e.s(["PageLoading",0,({isLoading:e,pastDelay:a,timedOut:n,error:r,retry:o,...l})=>(0,i.jsx)("div",{style:{paddingBlockStart:100,textAlign:"center"},children:(0,i.jsx)(t.Spin,{size:"large",...l})})])},106555,e=>{"use strict";var t=e.i(379049),i=e.i(56206),a=e.i(191788),n=e.i(814432),r=e.i(889590),o=e.i(391398);e.s(["GridContent",0,e=>{let l=(0,a.useContext)(n.RouteContext),{children:d,contentWidth:s,className:c,style:u}=e,{getPrefixCls:g}=(0,a.useContext)(t.ConfigProvider.ConfigContext),m=e.prefixCls||g("pro"),h=s||l.contentWidth,p=`${m}-grid-content`,{wrapSSR:$,hashId:b}=(0,r.useStyle)("ProLayoutGridContent",e=>[{[({...e,componentCls:`.${p}`}).componentCls]:{boxSizing:"border-box",width:"100%","&-wide":{maxWidth:1152,margin:"0 auto"}}}]),f="Fixed"===h&&"top"===l.layout;return $((0,o.jsx)("div",{className:(0,i.clsx)(p,b,c,{[`${p}-wide`]:f}),style:u,"data-testid":"pro-grid-content",children:(0,o.jsx)("div",{className:(0,i.clsx)(`${m}-grid-content-children`,b),children:d})}))}],106555)},132259,e=>{"use strict";var t=e.i(313213);e.s(["Space",()=>t.default])},154165,e=>{"use strict";var t=e.i(934854),i=(e,i={})=>!(0,t.isNonNullable)(e)&&i?.skipEmpty?[]:Array.isArray(e)?e:[e];e.s(["default",()=>i])},439214,e=>{"use strict";var t=e.i(191788),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},a=e.i(117716);function n(){return(n=Object.assign.bind()).apply(this,arguments)}let r=t.forwardRef((e,r)=>t.createElement(a.default,n({},e,{ref:r,icon:i})));e.s(["default",()=>r],439214)},454895,e=>{"use strict";var t=e.i(267226);e.s(["Tabs",()=>t.default])},814432,e=>{"use strict";let t=(0,e.i(191788).createContext)({});e.s(["RouteContext",0,t])},825788,e=>{"use strict";var t=e.i(391398),i=e.i(191788),a={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z",fill:e}},{tag:"path",attrs:{d:"M679.7 201c-73.1 0-136.5 40.8-167.7 100.4C480.8 241.8 417.4 201 344.3 201c-104 0-188.3 82.6-188.3 184.5 0 201.2 356 429.3 356 429.3s356-228.1 356-429.3C868 283.6 783.7 201 679.7 201z",fill:t}}]}},name:"heart",theme:"twotone"},n=e.i(117716);function r(){return(r=Object.assign.bind()).apply(this,arguments)}let o=i.forwardRef((e,t)=>i.createElement(n.default,r({},e,{ref:t,icon:a})));var l={icon:function(e,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z",fill:e}},{tag:"path",attrs:{d:"M512 140c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zM288 421a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm224 272c-85.5 0-155.6-67.3-160-151.6a8 8 0 018-8.4h48.1c4.2 0 7.8 3.2 8.1 7.4C420 589.9 461.5 629 512 629s92.1-39.1 95.8-88.6c.3-4.2 3.9-7.4 8.1-7.4H664a8 8 0 018 8.4C667.6 625.7 597.5 693 512 693zm176-224a48.01 48.01 0 010-96 48.01 48.01 0 010 96z",fill:t}},{tag:"path",attrs:{d:"M288 421a48 48 0 1096 0 48 48 0 10-96 0zm376 112h-48.1c-4.2 0-7.8 3.2-8.1 7.4-3.7 49.5-45.3 88.6-95.8 88.6s-92-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4zm-24-112a48 48 0 1096 0 48 48 0 10-96 0z",fill:e}}]}},name:"smile",theme:"twotone"};function d(){return(d=Object.assign.bind()).apply(this,arguments)}let s=i.forwardRef((e,t)=>i.createElement(n.default,d({},e,{ref:t,icon:l})));var c=e.i(203112);e.i(113297);var u=e.i(538178),g=e.i(579908),m=e.i(946077),h=e.i(560370),p=()=>{let e=(0,u.useIntl)();return(0,t.jsxs)(c.PageContainer,{content:e.formatMessage({id:"pages.admin.subPage.title",defaultMessage:"This page can only be viewed by admin"}),children:[(0,t.jsxs)(m.Card,{children:[(0,t.jsx)(g.Alert,{title:e.formatMessage({id:"pages.welcome.alertMessage",defaultMessage:"Faster and stronger heavy-duty components have been released."}),type:"success",showIcon:!0,banner:!0,style:{margin:-12,marginBottom:48}}),(0,t.jsxs)(h.Typography.Title,{level:2,style:{textAlign:"center"},children:[(0,t.jsx)(s,{})," Ant Design Pro"," ",(0,t.jsx)(o,{twoToneColor:"#eb2f96"})," You"]})]}),(0,t.jsxs)("p",{style:{textAlign:"center",marginTop:24},children:["Want to add more pages? Please refer to"," ",(0,t.jsx)("a",{href:"https://pro.ant.design/docs/block-cn",target:"_blank",rel:"noopener noreferrer",children:"use block"}),"。"]})]})};e.s(["default",()=>p],825788)},946077,e=>{"use strict";var t=e.i(191788);e.i(957562);var i=e.i(191248),a=e.i(531983),n=e.i(56206),r=e.i(430898),o=e.i(993175),l=e.i(625263),d=e.i(536995),s=e.i(106422),c=e.i(267226),u=({prefixCls:e,className:i,hoverable:a=!0,...r})=>{let{getPrefixCls:l}=t.useContext(o.ConfigContext),d=l("card",e),s=(0,n.clsx)(`${d}-grid`,i,{[`${d}-grid-hoverable`]:a});return t.createElement("div",{...r,className:s})};e.i(290586);var g=e.i(774778),m=e.i(307441),h=e.i(352050),p=e.i(104616),$=(0,h.genStyleHooks)("Card",e=>{let t=(0,p.mergeToken)(e,{cardShadow:e.boxShadowCard,cardHeadPadding:e.padding,cardPaddingBase:e.paddingLG,cardActionsIconSize:e.fontSize});return[(e=>{let{componentCls:t,cardShadow:i,cardHeadPadding:a,colorBorderSecondary:n,boxShadowTertiary:r,bodyPadding:o,extraColor:l,motionDurationMid:d}=e;return{[t]:{...(0,m.resetComponent)(e),position:"relative",background:e.colorBgContainer,borderRadius:e.borderRadiusLG,[`&:not(${t}-bordered)`]:{boxShadow:r},[`${t}-head`]:(e=>{let{antCls:t,componentCls:i,headerHeight:a,headerPadding:n,tabsMarginBottom:r}=e;return{display:"flex",justifyContent:"center",flexDirection:"column",minHeight:a,marginBottom:-1,padding:`0 ${(0,g.unit)(n)}`,color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.headerFontSize,background:e.headerBg,borderBottom:`${(0,g.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`,borderRadius:`${(0,g.unit)(e.borderRadiusLG)} ${(0,g.unit)(e.borderRadiusLG)} 0 0`,...(0,m.clearFix)(),"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":{display:"inline-block",flex:1,...m.textEllipsis,[`
> ${i}-typography,
> ${i}-typography-edit-content
`]:{insetInlineStart:0,marginTop:0,marginBottom:0}},[`${t}-tabs-top`]:{clear:"both",marginBottom:r,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,"&-bar":{borderBottom:`${(0,g.unit)(e.lineWidth)} ${e.lineType} ${e.colorBorderSecondary}`}}}})(e),[`${t}-extra`]:{marginInlineStart:"auto",color:l,fontWeight:"normal",fontSize:e.fontSize},[`${t}-body`]:{padding:o,borderRadius:`0 0 ${(0,g.unit)(e.borderRadiusLG)} ${(0,g.unit)(e.borderRadiusLG)}`,"&:first-child":{borderStartStartRadius:e.borderRadiusLG,borderStartEndRadius:e.borderRadiusLG},"&:not(:last-child)":{borderEndStartRadius:0,borderEndEndRadius:0}},[`${t}-grid`]:(e=>{let{cardPaddingBase:t,colorBorderSecondary:i,cardShadow:a,lineWidth:n}=e;return{width:"33.33%",padding:t,border:0,borderRadius:0,boxShadow:`
${(0,g.unit)(n)} 0 0 0 ${i},
0 ${(0,g.unit)(n)} 0 0 ${i},
${(0,g.unit)(n)} ${(0,g.unit)(n)} 0 0 ${i},
${(0,g.unit)(n)} 0 0 0 ${i} inset,
0 ${(0,g.unit)(n)} 0 0 ${i} inset;
`,transition:`all ${e.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:a}}})(e),[`${t}-cover`]:{"> *":{display:"block",width:"100%",borderRadius:`${(0,g.unit)(e.borderRadiusLG)} ${(0,g.unit)(e.borderRadiusLG)} 0 0`}},[`${t}-actions`]:(e=>{let{componentCls:t,iconCls:i,actionsLiMargin:a,cardActionsIconSize:n,colorBorderSecondary:r,actionsBg:o}=e;return{margin:0,padding:0,listStyle:"none",background:o,borderTop:`${(0,g.unit)(e.lineWidth)} ${e.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${(0,g.unit)(e.borderRadiusLG)} ${(0,g.unit)(e.borderRadiusLG)}`,...(0,m.clearFix)(),"& > li":{margin:a,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), > ${i}`]:{display:"inline-block",width:"100%",color:e.colorIcon,lineHeight:(0,g.unit)(e.fontHeight),transition:`color ${e.motionDurationMid}`,"&:hover":{color:e.colorPrimary}},[`> ${i}`]:{fontSize:n,lineHeight:(0,g.unit)(e.calc(n).mul(e.lineHeight).equal())}},"&:not(:last-child)":{borderInlineEnd:`${(0,g.unit)(e.lineWidth)} ${e.lineType} ${r}`}}}})(e),[`${t}-meta`]:{margin:`${(0,g.unit)(e.calc(e.marginXXS).mul(-1).equal())} 0`,display:"flex",...(0,m.clearFix)(),"&-avatar":{paddingInlineEnd:e.padding},"&-section":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:e.marginXS}},"&-title":{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:e.fontSizeLG,...m.textEllipsis},"&-description":{color:e.colorTextDescription}}},[`${t}-bordered`]:{border:`${(0,g.unit)(e.lineWidth)} ${e.lineType} ${n}`,[`${t}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${t}-hoverable`]:{cursor:"pointer",transition:["box-shadow","border-color"].map(e=>`${e} ${d}`).join(", "),"&:hover":{borderColor:"transparent",boxShadow:i}},[`${t}-contain-grid`]:{borderRadius:`${(0,g.unit)(e.borderRadiusLG)} ${(0,g.unit)(e.borderRadiusLG)} 0 0 `,[`&:not(:has(> ${t}-head))`]:{borderRadius: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:a}}},[`${t}-type-inner`]:(e=>{let{componentCls:t,colorFillAlter:i,headerPadding:a,bodyPadding:n}=e;return{[`${t}-head`]:{padding:`0 ${(0,g.unit)(a)}`,background:i,"&-title":{fontSize:e.fontSize}},[`${t}-body`]:{padding:`${(0,g.unit)(e.padding)} ${(0,g.unit)(n)}`}}})(e),[`${t}-loading`]:(e=>{let{componentCls:t}=e;return{overflow:"hidden",[`${t}-body`]:{userSelect:"none"}}})(e),[`${t}-rtl`]:{direction:"rtl"}}})(t),(e=>{let{componentCls:t,bodyPaddingSM:i,headerPaddingSM:a,headerHeightSM:n,headerFontSizeSM:r}=e;return{[`${t}-small`]:{[`> ${t}-head`]:{minHeight:n,padding:`0 ${(0,g.unit)(a)}`,fontSize:r,[`> ${t}-head-wrapper`]:{[`> ${t}-extra`]:{fontSize:e.fontSize}}},[`> ${t}-body`]:{padding:i}},[`${t}-small${t}-contain-tabs`]:{[`> ${t}-head`]:{[`${t}-head-title, ${t}-extra`]:{paddingTop:0,display:"flex",alignItems:"center"}}}}})(t)]},e=>({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:e.bodyPadding??e.paddingLG,headerPadding:e.headerPadding??e.paddingLG}));let b=e=>{let{actionClasses:i,actions:a=[],actionStyle:n}=e;return t.createElement("ul",{className:i,style:n},a.map((e,i)=>{let n=`action-${i}`;return t.createElement("li",{style:{width:`${100/a.length}%`},key:n},t.createElement("span",null,e))}))},f=t.forwardRef((e,g)=>{let m,{prefixCls:h,className:p,rootClassName:f,style:x,extra:y,headStyle:v={},bodyStyle:S={},title:C,loading:z,bordered:w,variant:E,size:R,type:M,cover:T,actions:N,tabList:G,children:L,activeTabKey:B,defaultActiveTabKey:H,tabBarExtraContent:W,hoverable:k,tabProps:j={},classNames:P,styles:I,...q}=e,{getPrefixCls:A,direction:F,className:D,style:_,classNames:X,styles:O}=(0,o.useComponentConfig)("card"),[K]=(0,d.default)("card",E,w),V=(0,l.default)(R),Y={...e,size:V,variant:K},[J,Q]=(0,r.useMergeSemantic)([X,P],[O,I],{props:Y}),U=t.useMemo(()=>(0,a.toArray)(L),[L]),Z=t.useMemo(()=>U.some(e=>t.isValidElement(e)&&e.type===u),[U]),ee=A("card",h),[et,ei]=$(ee),ea=t.createElement(s.default,{loading:!0,active:!0,paragraph:{rows:4},title:!1},L),en=void 0!==B,er={...j,[en?"activeKey":"defaultActiveKey"]:en?B:H,tabBarExtraContent:W},eo=G?t.createElement(c.default,{size:"small"!==V?"large":V,...er,className:`${ee}-head-tabs`,onChange:t=>{e.onTabChange?.(t)},items:G.map(({tab:e,...t})=>({label:e,...t}))}):null;if(C||y||eo){let e=(0,n.clsx)(`${ee}-head`,J.header),i=(0,n.clsx)(`${ee}-head-title`,J.title),a=(0,n.clsx)(`${ee}-extra`,J.extra),r={...v,...Q.header};m=t.createElement("div",{className:e,style:r},t.createElement("div",{className:`${ee}-head-wrapper`},C&&t.createElement("div",{className:i,style:Q.title},C),y&&t.createElement("div",{className:a,style:Q.extra},y)),eo)}let el=(0,n.clsx)(`${ee}-cover`,J.cover),ed=T?t.createElement("div",{className:el,style:Q.cover},T):null,es=(0,n.clsx)(`${ee}-body`,J.body),ec={...S,...Q.body},eu=z||U.length?t.createElement("div",{className:es,style:ec},z?ea:L):null,eg=(0,n.clsx)(`${ee}-actions`,J.actions),em=N?.length?t.createElement(b,{actionClasses:eg,actionStyle:Q.actions,actions:N}):null,eh=(0,i.omit)(q,["onTabChange"]),ep=(0,n.clsx)(ee,D,{[`${ee}-loading`]:z,[`${ee}-bordered`]:"borderless"!==K,[`${ee}-hoverable`]:k,[`${ee}-contain-grid`]:Z,[`${ee}-contain-tabs`]:G?.length,[`${ee}-small`]:"small"===V,[`${ee}-type-${M}`]:!!M,[`${ee}-rtl`]:"rtl"===F},p,f,et,ei,J.root),e$={...Q.root,..._,...x};return t.createElement("div",{ref:g,...eh,className:ep,style:e$},m,ed,eu,em)});f.Grid=u,f.Meta=e=>{let{prefixCls:i,className:a,avatar:l,title:d,description:s,style:c,classNames:u,styles:g,...m}=e,{getPrefixCls:h,className:p,style:$,classNames:b,styles:f}=(0,o.useComponentConfig)("cardMeta"),x=h("card",i),y=`${x}-meta`,[v,S]=(0,r.useMergeSemantic)([b,u],[f,g],{props:e}),C=(0,n.clsx)(y,a,p,v.root),z={...$,...S.root,...c},w=(0,n.clsx)(`${y}-avatar`,v.avatar),E=(0,n.clsx)(`${y}-title`,v.title),R=(0,n.clsx)(`${y}-description`,v.description),M=(0,n.clsx)(`${y}-section`,v.section),T=l?t.createElement("div",{className:w,style:S.avatar},l):null,N=d?t.createElement("div",{className:E,style:S.title},d):null,G=s?t.createElement("div",{className:R,style:S.description},s):null,L=N||G?t.createElement("div",{className:M,style:S.section},N,G):null;return t.createElement("div",{...m,className:C,style:z},T,L)},e.s(["Card",()=>f],946077)}]);