👨🏻‍💻👩🏻‍💻 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.
 
 
 

1 lines
7.9 KiB

(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6301],{19999:function(w,F,l){"use strict";l.r(F),l.d(F,{default:function(){return Q}});var v=l(11849),G=l(2824),j=l(67294),i=l(25377),S=l(79004),N=l(93224),B=l(73727),T=l(79370),q=l(59250),I=l(13013),_=l(20228),W=l(11382),nn=l(94233),L=l(51890),tn=l(30887),E=l(28682),H=l(55035),n=l(85893);function C(a,e,o,s){if(a.rightRender)return a.rightRender(o,s,a);var d=(0,n.jsx)(E.Z,{className:"umi-plugin-layout-menu",children:(0,n.jsxs)(E.Z.Item,{onClick:function(){return a.logout&&(a==null?void 0:a.logout(o))},children:[(0,n.jsx)(H.Z,{}),"\u9000\u51FA\u767B\u5F55"]},"logout")}),t=(0,n.jsxs)("span",{className:"umi-plugin-layout-action",children:[(0,n.jsx)(L.C,{size:"small",className:"umi-plugin-layout-avatar",src:(o==null?void 0:o.avatar)||"https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png",alt:"avatar"}),(0,n.jsx)("span",{className:"umi-plugin-layout-name",children:o==null?void 0:o.name})]});return e?(0,n.jsx)("div",{className:"umi-plugin-layout-right",children:(0,n.jsx)(W.Z,{size:"small",style:{marginLeft:8,marginRight:8}})}):(0,n.jsxs)("div",{className:"umi-plugin-layout-right anticon",children:[a.logout?(0,n.jsx)(I.Z,{overlay:d,overlayClassName:"umi-plugin-layout-container",children:t}):t,i.pD&&(0,n.jsx)(i.pD,{})]})}var en=l(57106),Z=l(99683),ln=l(57663),M=l(71577);function z(){i.m8.push("/")}var $=function(){return(0,n.jsx)(Z.ZP,{status:"404",title:"404",subTitle:"\u62B1\u6B49\uFF0C\u4F60\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728",extra:(0,n.jsx)(M.Z,{type:"primary",onClick:z,children:"\u8FD4\u56DE\u9996\u9875"})})},U=function(){return(0,n.jsx)(Z.ZP,{status:"403",title:"403",subTitle:"\u62B1\u6B49\uFF0C\u4F60\u65E0\u6743\u8BBF\u95EE\u8BE5\u9875\u9762",extra:(0,n.jsx)(M.Z,{type:"primary",onClick:z,children:"\u8FD4\u56DE\u9996\u9875"})})},O=function(e){var o=e.children,s=e.currentPathConfig;return s?s.unAccessible||s.unaccessible?e.unAccessible||(0,n.jsx)(U,{}):o:e.noFound||(0,n.jsx)($,{})},D=l(27754),K=function(){return(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 200 200",children:[(0,n.jsxs)("defs",{children:[(0,n.jsxs)("linearGradient",{id:"linearGradient-1",x1:"62.102%",x2:"108.197%",y1:"0%",y2:"37.864%",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:"#4285EB"}),(0,n.jsx)("stop",{offset:"100%",stopColor:"#2EC7FF"})]}),(0,n.jsxs)("linearGradient",{id:"linearGradient-2",x1:"69.644%",x2:"54.043%",y1:"0%",y2:"108.457%",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:"#29CDFF"}),(0,n.jsx)("stop",{offset:"37.86%",stopColor:"#148EFF"}),(0,n.jsx)("stop",{offset:"100%",stopColor:"#0A60FF"})]}),(0,n.jsxs)("linearGradient",{id:"linearGradient-3",x1:"69.691%",x2:"16.723%",y1:"-12.974%",y2:"117.391%",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:"#FA816E"}),(0,n.jsx)("stop",{offset:"41.473%",stopColor:"#F74A5C"}),(0,n.jsx)("stop",{offset:"100%",stopColor:"#F51D2C"})]}),(0,n.jsxs)("linearGradient",{id:"linearGradient-4",x1:"68.128%",x2:"30.44%",y1:"-35.691%",y2:"114.943%",children:[(0,n.jsx)("stop",{offset:"0%",stopColor:"#FA8E7D"}),(0,n.jsx)("stop",{offset:"51.264%",stopColor:"#F74A5C"}),(0,n.jsx)("stop",{offset:"100%",stopColor:"#F51D2C"})]})]}),(0,n.jsx)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:(0,n.jsx)("g",{transform:"translate(-20 -20)",children:(0,n.jsx)("g",{transform:"translate(20 20)",children:(0,n.jsxs)("g",{children:[(0,n.jsxs)("g",{fillRule:"nonzero",children:[(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{fill:"url(#linearGradient-1)",d:"M91.588 4.177L4.18 91.513a11.981 11.981 0 000 16.974l87.408 87.336a12.005 12.005 0 0016.989 0l36.648-36.618c4.209-4.205 4.209-11.023 0-15.228-4.208-4.205-11.031-4.205-15.24 0l-27.783 27.76c-1.17 1.169-2.945 1.169-4.114 0l-69.802-69.744c-1.17-1.169-1.17-2.942 0-4.11l69.802-69.745c1.17-1.169 2.944-1.169 4.114 0l27.783 27.76c4.209 4.205 11.032 4.205 15.24 0 4.209-4.205 4.209-11.022 0-15.227L108.581 4.056c-4.719-4.594-12.312-4.557-16.993.12z"}),(0,n.jsx)("path",{fill:"url(#linearGradient-2)",d:"M91.588 4.177L4.18 91.513a11.981 11.981 0 000 16.974l87.408 87.336a12.005 12.005 0 0016.989 0l36.648-36.618c4.209-4.205 4.209-11.023 0-15.228-4.208-4.205-11.031-4.205-15.24 0l-27.783 27.76c-1.17 1.169-2.945 1.169-4.114 0l-69.802-69.744c-1.17-1.169-1.17-2.942 0-4.11l69.802-69.745c2.912-2.51 7.664-7.596 14.642-8.786 5.186-.883 10.855 1.062 17.009 5.837L108.58 4.056c-4.719-4.594-12.312-4.557-16.993.12z"})]}),(0,n.jsx)("path",{fill:"url(#linearGradient-3)",d:"M153.686 135.855c4.208 4.205 11.031 4.205 15.24 0l27.034-27.012c4.7-4.696 4.7-12.28 0-16.974l-27.27-27.15c-4.218-4.2-11.043-4.195-15.254.013-4.209 4.205-4.209 11.022 0 15.227l18.418 18.403c1.17 1.169 1.17 2.943 0 4.111l-18.168 18.154c-4.209 4.205-4.209 11.023 0 15.228z"})]}),(0,n.jsx)("ellipse",{cx:"100.519",cy:"100.437",fill:"url(#linearGradient-4)",rx:"23.6",ry:"23.581"})]})})})})]})},P=K,V=function(e){var o,s,d,t={};return e!=null&&e.hideFooter&&(t.footerRender=!1),(e==null?void 0:e.layout)==!1?(t.pure=!0,t):(e!=null&&(o=e.layout)!==null&&o!==void 0&&o.hideMenu&&(t.menuRender=!1),e!=null&&(s=e.layout)!==null&&s!==void 0&&s.hideFooter&&(t.footerRender=!1),e!=null&&(d=e.layout)!==null&&d!==void 0&&d.hideNav&&(t.headerRender=!1),t)},X=V,Y=function(e){var o,s=e.children,d=e.userConfig,t=d===void 0?{}:d,f=e.location,p=e.route,R=(0,N.Z)(e,["children","userConfig","location","route"]),c=i.tT&&(0,i.tT)("@@initialState")||{initialState:void 0,loading:!1,setInitialState:null},h=c.initialState,g=c.loading,y=c.setInitialState,A=(0,j.useMemo)(function(){var u,r=(0,D.Un)((e==null||(u=e.route)===null||u===void 0?void 0:u.routes)||[],void 0,void 0,!0),m=r.menuData,k=(0,D.nG)(f.pathname,m).pop();return k||{}},[f==null?void 0:f.pathname,e==null||(o=e.route)===null||o===void 0?void 0:o.routes]),x=(0,v.Z)((0,v.Z)((0,v.Z)({itemRender:function(r){return(0,n.jsx)(B.rU,{to:r.path,children:r.breadcrumbName})}},t),R),X(A||{})),b=i.md===null||i.md===void 0?void 0:(0,i.md)();return(0,n.jsx)(T.ZP,(0,v.Z)((0,v.Z)({route:p,location:f,title:(t==null?void 0:t.name)||(t==null?void 0:t.title),navTheme:"dark",siderWidth:256,onMenuHeaderClick:function(r){r.stopPropagation(),r.preventDefault(),i.m8.push("/")},menu:{locale:t.locale},menuDataRender:t.patchMenus?function(u){return t==null?void 0:t.patchMenus(u,c)}:void 0,formatMessage:t==null?void 0:t.formatMessage,logo:P,menuItemRender:function(r,m){return r.isUrl?m:r.path&&f.pathname!==r.path?(0,n.jsx)(B.rU,{to:r.path,target:r.target,children:m}):m},disableContentMargin:!0,fixSiderbar:!0,fixedHeader:!0,postMenuData:i.Bz?function(u){return i.Bz===null||i.Bz===void 0?void 0:(0,i.Bz)(u,b)}:void 0},x),{},{rightContentRender:(x==null?void 0:x.rightContentRender)!==!1&&function(u){var r=C==null?void 0:C(t,g,h,y);return x.rightContentRender?x.rightContentRender(u,r,{userConfig:t,loading:g,initialState:h,setInitialState:y}):r},children:(0,n.jsx)(O,{noFound:t==null?void 0:t.noFound,unAccessible:t==null?void 0:t.unAccessible,currentPathConfig:A,children:t.childrenRender?t.childrenRender(s,e):s})}))},J=Y,Q=function(a){var e=(0,j.useState)(null),o=(0,G.Z)(e,2),s=o[0],d=o[1],t=i.tT&&(0,i.tT)("@@initialState")||{initialState:void 0,loading:!1,setInitialState:null},f=i.md===null||i.md===void 0?void 0:(0,i.md)();(0,j.useEffect)(function(){var h=i.BA.applyPlugins({key:"layout",type:S.Ac.modify,initialValue:(0,v.Z)((0,v.Z)({},t),{},{traverseModifyRoutes:function(y){return i.Bz===null||i.Bz===void 0?void 0:(0,i.Bz)(y,f)}})})||{};if(h instanceof Promise){h.then(function(g){d(g)});return}d(h)},[t==null?void 0:t.initialState,f]);var p=(0,v.Z)((0,v.Z)({},{name:"ant-design-pro",theme:"PRO",locale:!0,showBreadcrumb:!0,siderWidth:208,navTheme:"light",primaryColor:"#1890ff",layout:"mix",contentWidth:"Fluid",fixedHeader:!1,fixSiderbar:!0,colorWeak:!1,title:"Ant Design Pro",pwa:!1,logo:"https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg",iconfontUrl:""}),s||{}),R=(0,i.YB)(),c=R.formatMessage;return s?j.createElement(J,(0,v.Z)({userConfig:p,formatMessage:c},a)):null}}}]);