Files
weiyu/deploy/server/admin/t__plugin-layout__Layout.a12164f0.async.js
2025-11-11 16:36:56 +08:00

1 line
8.1 KiB
JavaScript

"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[6301],{20777:function(t,e,n){n.r(e),n.d(e,{default:function(){return W}});var i=n(45332),l=n.n(i),r=n(76711),a=n.n(r),o=n(73193),s=n.n(o),u=n(86222),d=n.n(u),c=n(14906),h=n(44194),f=n(12074),p=n(31549),g=function(){return(0,p.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 200 200",children:[(0,p.jsxs)("defs",{children:[(0,p.jsxs)("linearGradient",{id:"linearGradient-1",x1:"62.102%",x2:"108.197%",y1:"0%",y2:"37.864%",children:[(0,p.jsx)("stop",{offset:"0%",stopColor:"#4285EB"}),(0,p.jsx)("stop",{offset:"100%",stopColor:"#2EC7FF"})]}),(0,p.jsxs)("linearGradient",{id:"linearGradient-2",x1:"69.644%",x2:"54.043%",y1:"0%",y2:"108.457%",children:[(0,p.jsx)("stop",{offset:"0%",stopColor:"#29CDFF"}),(0,p.jsx)("stop",{offset:"37.86%",stopColor:"#148EFF"}),(0,p.jsx)("stop",{offset:"100%",stopColor:"#0A60FF"})]}),(0,p.jsxs)("linearGradient",{id:"linearGradient-3",x1:"69.691%",x2:"16.723%",y1:"-12.974%",y2:"117.391%",children:[(0,p.jsx)("stop",{offset:"0%",stopColor:"#FA816E"}),(0,p.jsx)("stop",{offset:"41.473%",stopColor:"#F74A5C"}),(0,p.jsx)("stop",{offset:"100%",stopColor:"#F51D2C"})]}),(0,p.jsxs)("linearGradient",{id:"linearGradient-4",x1:"68.128%",x2:"30.44%",y1:"-35.691%",y2:"114.943%",children:[(0,p.jsx)("stop",{offset:"0%",stopColor:"#FA8E7D"}),(0,p.jsx)("stop",{offset:"51.264%",stopColor:"#F74A5C"}),(0,p.jsx)("stop",{offset:"100%",stopColor:"#F51D2C"})]})]}),(0,p.jsx)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:(0,p.jsx)("g",{transform:"translate(-20 -20)",children:(0,p.jsx)("g",{transform:"translate(20 20)",children:(0,p.jsxs)("g",{children:[(0,p.jsxs)("g",{fillRule:"nonzero",children:[(0,p.jsxs)("g",{children:[(0,p.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,p.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,p.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,p.jsx)("ellipse",{cx:"100.519",cy:"100.437",fill:"url(#linearGradient-4)",rx:"23.6",ry:"23.581"})]})})})})]})},x=n(41040),m=n(82770),v=function(t){var e,n;return!t.route&&(t.noFound||t.notFound)||(null===(e=t.route)||void 0===e?void 0:e.unaccessible)&&(t.unAccessible||t.noAccessible)||(!t.route||(null===(n=t.route)||void 0===n?void 0:n.unaccessible))&&(0,p.jsx)(x.ZP,{status:t.route?"403":"404",title:t.route?"403":"404",subTitle:t.route?"抱歉,你无权访问该页面":"抱歉,你访问的页面不存在",extra:(0,p.jsx)(m.ZP,{type:"primary",onClick:function(){return c.history.push("/")},children:"返回首页"})})||t.children},y=n(33797),j=n(65207),C=n(42637),F=n(22511),k=n(2907),A=n(94433),b=n(29),S=n(64423),R=function(t,e){return h.createElement(S.Z,(0,A.Z)((0,A.Z)({},t),{},{ref:e,icon:b.Z}))};var Z=h.forwardRef(R),M=n(1131);var G=n(11422),w=n(74231),N=function t(e,n){if(0===e.length)return[];var i,l=[],r=d()(e);try{for(r.s();!(i=r.n()).done;){var o=i.value,u=s()({},o);n(o)?Array.isArray(u.routes)&&l.push.apply(l,a()(t(u.routes,n))):(Array.isArray(u.children)&&(u.children=t(u.children,n),u.routes=u.children),l.push(u))}}catch(t){r.e(t)}finally{r.f()}return l},L=function t(e){return 0===e.length?[]:e.map((function(e){var n=s()({},e);return e.originPath&&(n.path=e.originPath),Array.isArray(e.routes)&&(n.routes=t(e.routes)),Array.isArray(e.children)&&(n.children=t(e.children)),n}))},W=function(t){var e=(0,c.useLocation)(),n=(0,c.useNavigate)(),i=(0,c.useAppData)(),r=i.clientRoutes,a=i.pluginManager,o=G.t&&(0,G.t)("@@initialState")||{initialState:void 0,loading:!1,setInitialState:null},u=o.initialState,d=o.loading,x=o.setInitialState,m={locale:!0,navTheme:"light",collapsed:!1,layout:"mix",contentWidth:"Fluid",siderWidth:160,fixedHeader:!1,fixSiderbar:!0,colorWeak:!1,pwa:!0,token:{},splitMenus:!1,siderMenuType:"sub"},A=(0,M.YB)().formatMessage,b=a.applyPlugins({key:"layout",type:"modify",initialValue:s()({},o)}),S=N(r.filter((function(t){return"ant-design-pro-layout"===t.id})),(function(t){return!!t.isLayout&&"ant-design-pro-layout"!==t.id||!!t.isWrapper})),R=(0,w.Mf)(L(S)),W=l()(R,1)[0],z=(0,h.useMemo)((function(){var t,n;return null===(t=(0,c.matchRoutes)(W.children,e.pathname))||void 0===t||null===(n=t.pop)||void 0===n||null===(n=n.call(t))||void 0===n?void 0:n.route}),[e.pathname]);return(0,p.jsx)(f.f,s()(s()({route:W,location:e,title:m.title||"admin",navTheme:"dark",siderWidth:256,onMenuHeaderClick:function(t){t.stopPropagation(),t.preventDefault(),n("/")},formatMessage:m.formatMessage||A,menu:{locale:m.locale},logo:g,menuItemRender:function(t,n){return t.isUrl||t.children?n:t.path&&e.pathname!==t.path?(0,p.jsx)(c.Link,{to:t.path.replace("/*",""),target:t.target,children:n}):n},itemRender:function(t,e,n){var i=t.breadcrumbName,l=t.title,r=t.path,a=l||i,o=n[n.length-1];return!o||o.path!==r&&o.linkPath!==r?(0,p.jsx)(c.Link,{to:r,children:a}):(0,p.jsx)("span",{children:a})},disableContentMargin:!0,fixSiderbar:!0,fixedHeader:!0},b),{},{rightContentRender:!1!==b.rightContentRender&&function(t){var e=function(t){var e,n,i,l,r;if(t.runtimeConfig.rightRender)return t.runtimeConfig.rightRender(t.initialState,t.setInitialState,t.runtimeConfig);var a=(null===(e=t.initialState)||void 0===e?void 0:e.avatar)||(null===(n=t.initialState)||void 0===n?void 0:n.name)||t.runtimeConfig.logout,o=!1===(null===(i=t.initialState)||void 0===i?void 0:i.avatar),u=o?"umi-plugin-layout-name umi-plugin-layout-hide-avatar-img":"umi-plugin-layout-name",d=a?(0,p.jsxs)("span",{className:"umi-plugin-layout-action",children:[o?null:(0,p.jsx)(y.Z,{size:"small",className:"umi-plugin-layout-avatar",src:(null===(l=t.initialState)||void 0===l?void 0:l.avatar)||"https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png",alt:"avatar"}),(0,p.jsx)("span",{className:u,children:null===(r=t.initialState)||void 0===r?void 0:r.name})]}):null;if(t.loading)return(0,p.jsx)("div",{className:"umi-plugin-layout-right",children:(0,p.jsx)(j.Z,{size:"small",style:{marginLeft:8,marginRight:8}})});var c,h={className:"umi-plugin-layout-menu",selectedKeys:[],items:[{key:"logout",label:(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(Z,{}),"退出登录"]}),onClick:function(){var e,n;null==t||null===(e=t.runtimeConfig)||void 0===e||null===(n=e.logout)||void 0===n||n.call(e,t.initialState)}}]};return c=C.Z.startsWith("5.")||C.Z.startsWith("4.24.")?{menu:h}:C.Z.startsWith("3.")?{overlay:(0,p.jsx)(F.Z,{children:h.items.map((function(t){return(0,p.jsx)(F.Z.Item,{onClick:t.onClick,children:t.label},t.key)}))})}:{overlay:(0,p.jsx)(F.Z,s()({},h))},(0,p.jsxs)("div",{className:"umi-plugin-layout-right anticon",children:[t.runtimeConfig.logout?(0,p.jsx)(k.Z,s()(s()({},c),{},{overlayClassName:"umi-plugin-layout-container",children:d})):d,(0,p.jsx)(M.pD,{})]})}({runtimeConfig:b,loading:d,initialState:u,setInitialState:x});return b.rightContentRender?b.rightContentRender(t,e,{userConfig:m,runtimeConfig:b,loading:d,initialState:u,setInitialState:x}):e},children:(0,p.jsx)(v,{route:z,noFound:null==b?void 0:b.noFound,notFound:null==b?void 0:b.notFound,unAccessible:null==b?void 0:b.unAccessible,noAccessible:null==b?void 0:b.noAccessible,children:b.childrenRender?b.childrenRender((0,p.jsx)(c.Outlet,{}),t):(0,p.jsx)(c.Outlet,{})})}))}}}]);