create-ssnode-cli 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/index.js +0 -1
- package/package.json +2 -2
- package/templates/backend/package.json +1 -1
- package/templates/backend/scripts/build.cjs +67 -1
- package/templates/root/AGENTS.md +1 -1
- package/templates/root/README.md +6 -6
- package/templates/web/dist/assets/{404-f80ef771.js → 404-63aa5037.js} +1 -1
- package/templates/web/dist/assets/{404-legacy-3002ee98.js → 404-legacy-494c4093.js} +1 -1
- package/templates/web/dist/assets/{AuthLayout-f07f2dff.js → AuthLayout-07e9f5d2.js} +1 -1
- package/templates/web/dist/assets/{AuthLayout-legacy-635887dd.js → AuthLayout-legacy-1b94749f.js} +1 -1
- package/templates/web/dist/assets/Background-13406ae6.js +1 -0
- package/templates/web/dist/assets/Background-90a49ee7.css +1 -0
- package/templates/web/dist/assets/Background-legacy-35ca5eef.js +1 -0
- package/templates/web/dist/assets/{Screen-2126fd8d.js → Screen-4310b270.js} +1 -1
- package/templates/web/dist/assets/{Screen-legacy-e1974f1b.js → Screen-legacy-d5f1a31f.js} +1 -1
- package/templates/web/dist/assets/{ScreenChartOption-cc9d0192.js → ScreenChartOption-a6927065.js} +1 -1
- package/templates/web/dist/assets/{ScreenChartOption-legacy-b1b2d49d.js → ScreenChartOption-legacy-b4c04ce9.js} +1 -1
- package/templates/web/dist/assets/{api-21ca288f.js → api-83561db2.js} +1 -1
- package/templates/web/dist/assets/{api-legacy-b464070b.js → api-legacy-8e15c853.js} +1 -1
- package/templates/web/dist/assets/{base-8cbac341.js → base-5bf689c3.js} +1 -1
- package/templates/web/dist/assets/{base-legacy-ee9fb316.js → base-legacy-d3323277.js} +1 -1
- package/templates/web/dist/assets/{child-10cea360.js → child-87a05c88.js} +1 -1
- package/templates/web/dist/assets/{child-legacy-5af47aba.js → child-legacy-d4d0277d.js} +1 -1
- package/templates/web/dist/assets/{component-ae0df581.js → component-1fcd971d.js} +1 -1
- package/templates/web/dist/assets/{component-legacy-7824b5dc.js → component-legacy-943364e8.js} +1 -1
- package/templates/web/dist/assets/{demo-1b5e36be.js → demo-14e7532b.js} +1 -1
- package/templates/web/dist/assets/{demo-legacy-e12d2ac9.js → demo-legacy-da0d2bfa.js} +1 -1
- package/templates/web/dist/assets/{echarts-vendor-fdb2c14f.js → echarts-vendor-d6ce4b9c.js} +1 -1
- package/templates/web/dist/assets/{echarts-vendor-legacy-e99e5121.js → echarts-vendor-legacy-79597af6.js} +1 -1
- package/templates/web/dist/assets/{grandson-d5883b90.js → grandson-4f840b4d.js} +1 -1
- package/templates/web/dist/assets/{grandson-legacy-10cd2476.js → grandson-legacy-527ae016.js} +1 -1
- package/templates/web/dist/assets/{index-9fbd51da.js → index-268d1ac1.js} +1 -1
- package/templates/web/dist/assets/{index-5dbcad00.js → index-3448ef35.js} +1 -1
- package/templates/web/dist/assets/{index-6faaa6d8.js → index-3a2983ce.js} +1 -1
- package/templates/web/dist/assets/{index-25ea283a.js → index-5e7dfdb5.js} +1 -1
- package/templates/web/dist/assets/{index-16f6b85c.js → index-71f600d4.js} +1 -1
- package/templates/web/dist/assets/{index-687d6cfe.js → index-9120f091.js} +1 -1
- package/templates/web/dist/assets/{index-3a9a0a97.js → index-af61b79b.js} +1 -1
- package/templates/web/dist/assets/{index-fbf4ee3f.js → index-b75948c0.js} +1 -1
- package/templates/web/dist/assets/{index-5dbae75a.js → index-c1ee2fb3.js} +1 -1
- package/templates/web/dist/assets/{index-8f6fba9f.js → index-e03d0352.js} +1 -1
- package/templates/web/dist/assets/{index-2e42b180.js → index-e4c9d42a.js} +1 -1
- package/templates/web/dist/assets/{index-463d9205.js → index-f57c9694.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-07d00151.js → index-legacy-06643c96.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-ced5a7f1.js → index-legacy-081b881d.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-e9af81d8.js → index-legacy-0983aa0f.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-38c170dc.js → index-legacy-19a8ac10.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-9be704da.js → index-legacy-35c1de97.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-3d221bb6.js → index-legacy-376a4633.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-0f01787c.js → index-legacy-3a393896.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-ba034322.js → index-legacy-548904e6.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-f3e49a4e.js → index-legacy-5f22daba.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-dd62c9e7.js → index-legacy-8bba1715.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-8c7d1ee7.js → index-legacy-aebba3cb.js} +1 -1
- package/templates/web/dist/assets/{index-legacy-95da3338.js → index-legacy-b03d819e.js} +1 -1
- package/templates/web/dist/assets/{parent-e7114c1b.js → parent-ad02830b.js} +1 -1
- package/templates/web/dist/assets/{parent-legacy-9e493d04.js → parent-legacy-163f567f.js} +1 -1
- package/templates/web/dist/assets/{vendor-e7ea3a11.js → vendor-2663c204.js} +13 -13
- package/templates/web/dist/assets/{vendor-legacy-a62a28c9.js → vendor-legacy-2df23db3.js} +6 -6
- package/templates/web/dist/index.html +3 -3
- package/templates/web/src/layouts/Background.module.less +5 -3
- package/templates/web/dist/assets/Background-63ce83a2.js +0 -1
- package/templates/web/dist/assets/Background-b264d337.css +0 -1
- package/templates/web/dist/assets/Background-legacy-a34b521f.js +0 -1
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
/>
|
|
10
10
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
11
11
|
<title>-</title>
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="/assets/vendor-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-e4c9d42a.js"></script>
|
|
13
|
+
<link rel="modulepreload" crossorigin href="/assets/vendor-2663c204.js">
|
|
14
14
|
<link rel="stylesheet" href="/assets/index-ec1f790a.css">
|
|
15
15
|
<script type="module">import.meta.url;import("_").catch(()=>1);async function* g(){};if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
|
|
16
16
|
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<script src="/env.config.js"></script>
|
|
22
22
|
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
|
|
23
23
|
<script nomodule crossorigin id="vite-legacy-polyfill" src="/assets/polyfills-legacy-b0716348.js"></script>
|
|
24
|
-
<script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-
|
|
24
|
+
<script nomodule crossorigin id="vite-legacy-entry" data-src="/assets/index-legacy-aebba3cb.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
|
|
25
25
|
</body>
|
|
26
26
|
|
|
27
27
|
</html>
|
|
@@ -125,10 +125,12 @@
|
|
|
125
125
|
flex: 1;
|
|
126
126
|
overflow-y: auto;
|
|
127
127
|
overflow-x: hidden;
|
|
128
|
+
|
|
128
129
|
// 隐藏滚动条美化
|
|
129
130
|
&::-webkit-scrollbar {
|
|
130
131
|
width: 4px;
|
|
131
132
|
}
|
|
133
|
+
|
|
132
134
|
&::-webkit-scrollbar-thumb {
|
|
133
135
|
background: #3a3f48;
|
|
134
136
|
border-radius: 2px;
|
|
@@ -198,12 +200,12 @@
|
|
|
198
200
|
.contentview {
|
|
199
201
|
overflow: auto;
|
|
200
202
|
height: calc(100% - 84px);
|
|
201
|
-
padding: 20px;
|
|
203
|
+
// padding: 20px;
|
|
202
204
|
box-sizing: border-box;
|
|
203
205
|
// Airtable: hairline 边框 + 白底
|
|
204
206
|
background-color: white;
|
|
205
|
-
border: 1px solid #dddddd;
|
|
206
|
-
border-radius: 12px;
|
|
207
|
+
// border: 1px solid #dddddd;
|
|
208
|
+
// border-radius: 12px;
|
|
207
209
|
}
|
|
208
210
|
}
|
|
209
211
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as I,u as w,r as c,j as e,C as M,Z as P,D as K,f as E,A as O,U as R,g as S,M as T,h as D,i as F,k as W,O as B,l as U,z,m as L,L as $}from"./vendor-e7ea3a11.js";import{g as A,R as V,P as Z}from"./index-2e42b180.js";import{a as q}from"./api-21ca288f.js";import{a as G}from"./theme-3a4c7290.js";const H="_background_1usvo_10",J="_header_1usvo_19",Q="_logo_1usvo_28",X="_logotext_1usvo_31",Y="_menus_1usvo_36",ee="_menublock_1usvo_45",se="_menublockimg_1usvo_56",ne="_menublockselect_1usvo_64",oe="_userview_1usvo_68",te="_version_1usvo_75",le="_screenEntry_1usvo_85",ae="_bottom_1usvo_101",ce="_slider_1usvo_108",re="_menuWrap_1usvo_115",ie="_menuIcon_1usvo_127",ue="_sliderFooter_1usvo_139",de="_collapseText_1usvo_157",me="_right_1usvo_160",he="_route_1usvo_169",_e="_breadcrumb_1usvo_175",pe="_contentview_1usvo_178",o={background:H,header:J,logo:Q,logotext:X,menus:Y,menublock:ee,menublockimg:se,menublockselect:ne,userview:oe,version:te,screenEntry:le,bottom:ae,slider:ce,menuWrap:re,menuIcon:ie,sliderFooter:ue,collapseText:de,right:me,route:he,breadcrumb:_e,contentview:pe};U.locale(z);L.object;function be(){const i=I(),h=w(),b=c.useRef(),[_,j]=c.useState([]),[u,k]=c.useState(!1),[m,p]=c.useState({selectKeys:[],openKeys:[]}),y=c.useCallback(s=>e.jsx("a",{href:s.path,style:{color:"unset",fontSize:16},children:s.title},s.path),[]),v=c.useCallback((s,l)=>{const n=l&&s.selectIcon||s.icon;if(n)return typeof n!="string"?n:e.jsx("i",{className:o.menuIcon,style:{maskImage:"url(".concat(n,")"),WebkitMaskImage:"url(".concat(n,")")}})},[]);c.useEffect(()=>{const{routes:s}=A(i.pathname),l=[...s];l.pop(),p({openKeys:l.map(n=>n.fullPath),selectKeys:s.map(n=>n.fullPath)})},[i.pathname]),c.useEffect(()=>{var r,a;const s=V.find(t=>t.name==="系统"),l=(r=s==null?void 0:s.children)==null?void 0:r.find(t=>t.name==="后台管理系统"),n=(a=l==null?void 0:l.children)==null?void 0:a.find(t=>t.name==="后台管理系统");j((n==null?void 0:n.children)||[])},[]);const N=c.useMemo(()=>{const s=(l,n,r=[])=>l.filter(a=>a.name&&!a.hideInMenu).reduce((a,t)=>{var f;if(a)return a;const d=[...r,t];if(t.fullPath===n)return d;if((f=t.children)!=null&&f.length){const g=s(t.children,n,d);if(g)return g}return null},null);return s(_,i.pathname)||[]},[_,i.pathname]),x=(s,l=[])=>s.filter(n=>n.name&&!n.hideInMenu).map(n=>{var t;const r=m.selectKeys.includes(n.fullPath);return((t=n.children)==null?void 0:t.filter(d=>d.name&&!d.hideInMenu).length)>0?{key:n.fullPath,icon:v(n,r),label:n.name,children:x(n.children,[...l,n])}:{key:n.fullPath,icon:v(n,r),label:n.name}}),C=[{key:"logout",label:"退出系统",icon:e.jsx($,{}),onClick:()=>{q.admin.user.logout().then(s=>{s&&h("/login?redirect=".concat(encodeURIComponent(i.pathname+i.search)))})}}];return e.jsx(M,{locale:P,theme:G,children:e.jsx("div",{style:{width:"100vw",height:"100vh"},children:e.jsxs("div",{className:o.background,ref:b,children:[e.jsxs("div",{className:o.header,children:[e.jsx("img",{className:o.logo,alt:"logo",src:"/logo.svg"}),e.jsx("span",{className:o.logotext,children:Z.title}),e.jsx("div",{style:{flex:1}}),e.jsxs("div",{className:o.userview,children:[e.jsx("span",{className:o.version,children:"v1.0.0"}),e.jsx("button",{type:"button",className:o.screenEntry,title:"进入大屏",onClick:()=>h("/screen"),children:e.jsx(K,{})}),e.jsx(E,{menu:{items:C},children:e.jsxs("div",{className:o.userInfo,children:[e.jsx(O,{style:{backgroundColor:"transparent",border:"2px solid #d1d1d1"},icon:e.jsx(R,{})}),e.jsx("span",{style:{margin:"0 10px"},children:"admin"}),e.jsx(S,{})]})})]})]}),e.jsxs("div",{className:o.bottom,children:[e.jsxs("div",{className:o.slider,style:{width:u?64:240},children:[e.jsx("div",{className:o.menuWrap,children:e.jsx(T,{mode:"inline",inlineCollapsed:u,items:x(_),onSelect:s=>{h(s.key)},selectedKeys:m.selectKeys,openKeys:u?[]:m.openKeys,onOpenChange:s=>{p({...m,openKeys:s})}})}),e.jsxs("div",{className:o.sliderFooter,onClick:()=>k(s=>!s),role:"button",tabIndex:0,children:[u?e.jsx(D,{}):e.jsx(F,{}),!u&&e.jsx("span",{className:o.collapseText,children:"收起菜单"})]})]}),e.jsxs("div",{className:o.right,children:[e.jsx("div",{className:o.route,children:e.jsx(W,{items:N.map(s=>({key:s.name,title:s.name,path:s.fullPath})),className:o.breadcrumb,itemRender:y})}),e.jsx("div",{className:o.contentview,children:e.jsx(B,{})})]})]})]})})})}export{be as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._background_1usvo_10{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box;transform-origin:left top;background-color:#f8fafc}._background_1usvo_10 ._header_1usvo_19{display:flex;flex-direction:row;align-items:center;padding:0 15px;height:60px;color:#fff;background-color:#181d26}._background_1usvo_10 ._header_1usvo_19 ._logo_1usvo_28{width:32px}._background_1usvo_10 ._header_1usvo_19 ._logotext_1usvo_31{margin-left:10px;font-size:20px;line-height:20px}._background_1usvo_10 ._header_1usvo_19 ._menus_1usvo_36{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;margin-right:50px;font-size:16px;flex:1}._background_1usvo_10 ._header_1usvo_19 ._menus_1usvo_36 ._menublock_1usvo_45{display:flex;flex-direction:row;align-items:center;margin-left:30px;border-bottom:2px solid transparent;height:60px;color:#d0d6e0;box-sizing:border-box;cursor:pointer}._background_1usvo_10 ._header_1usvo_19 ._menus_1usvo_36 ._menublock_1usvo_45 ._menublockimg_1usvo_56{margin-right:8px;width:20px}._background_1usvo_10 ._header_1usvo_19 ._menus_1usvo_36 ._menublock_1usvo_45:hover,._background_1usvo_10 ._header_1usvo_19 ._menus_1usvo_36 ._menublockselect_1usvo_64{border-color:#fff;color:#fff}._background_1usvo_10 ._header_1usvo_19 ._userview_1usvo_68{cursor:pointer;display:flex;align-items:center;gap:14px}._background_1usvo_10 ._header_1usvo_19 ._userview_1usvo_68 ._version_1usvo_75{color:#9297a0;font-size:12px;line-height:1;padding:3px 8px;border:1px solid #3a3f48;border-radius:10px;background:rgba(255,255,255,.04);white-space:nowrap}._background_1usvo_10 ._header_1usvo_19 ._userview_1usvo_68 ._screenEntry_1usvo_85{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;color:#9297a0;font-size:16px;line-height:1;transition:color .2s,background .2s}._background_1usvo_10 ._header_1usvo_19 ._userview_1usvo_68 ._screenEntry_1usvo_85:hover{color:#fff;background:rgba(255,255,255,.08)}._background_1usvo_10 ._bottom_1usvo_101{display:flex;flex-direction:row;width:100%;height:calc(100% - 60px);box-sizing:border-box}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108{display:flex;flex-direction:column;background-color:#1d1f25;transition:width .2s ease;overflow:hidden}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._menuWrap_1usvo_115{flex:1;overflow-y:auto;overflow-x:hidden}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._menuWrap_1usvo_115::-webkit-scrollbar{width:4px}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._menuWrap_1usvo_115::-webkit-scrollbar-thumb{background:#3a3f48;border-radius:2px}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._menuIcon_1usvo_127{display:inline-block;width:16px;height:16px;background-color:currentColor;mask-size:contain;mask-repeat:no-repeat;mask-position:center;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._sliderFooter_1usvo_139{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;height:48px;border-top:1px solid #2a2d35;color:#d0d6e0;font-size:14px;cursor:pointer;user-select:none;flex-shrink:0}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._sliderFooter_1usvo_139:hover{background-color:#23262e;color:#fff}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._sliderFooter_1usvo_139 ._collapseText_1usvo_157{white-space:nowrap}._background_1usvo_10 ._bottom_1usvo_101 ._right_1usvo_160{display:flex;flex-direction:column;padding:0 40px;flex:1;width:0;box-sizing:border-box;background-color:#f8fafc}._background_1usvo_10 ._bottom_1usvo_101 ._right_1usvo_160 ._route_1usvo_169{display:flex;flex-direction:row;align-items:center;height:44px}._background_1usvo_10 ._bottom_1usvo_101 ._right_1usvo_160 ._route_1usvo_169 ._breadcrumb_1usvo_175{color:#333840}._background_1usvo_10 ._bottom_1usvo_101 ._right_1usvo_160 ._contentview_1usvo_178{overflow:auto;height:calc(100% - 84px);padding:20px;box-sizing:border-box;background-color:#fff;border:1px solid #dddddd;border-radius:12px}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./vendor-legacy-a62a28c9.js","./index-legacy-8c7d1ee7.js","./api-legacy-b464070b.js","./theme-legacy-ad78aecb.js"],(function(e,o){"use strict";var s,_,r,n,t,i,u,l,a,c,d,v,m,h,b,x,g,p,f,k,y,j,w,N,z;return{setters:[e=>{s=e.e,_=e.u,r=e.r,n=e.j,t=e.C,i=e.Z,u=e.D,l=e.f,a=e.A,c=e.U,d=e.g,v=e.M,m=e.h,h=e.i,b=e.k,x=e.O,g=e.l,p=e.z,f=e.m,k=e.L},e=>{y=e.g,j=e.R,w=e.P},e=>{N=e.a},e=>{z=e.a}],execute:function(){var o=document.createElement("style");o.textContent="._background_1usvo_10{display:flex;flex-direction:column;width:100%;height:100%;box-sizing:border-box;transform-origin:left top;background-color:#f8fafc}._background_1usvo_10 ._header_1usvo_19{display:flex;flex-direction:row;align-items:center;padding:0 15px;height:60px;color:#fff;background-color:#181d26}._background_1usvo_10 ._header_1usvo_19 ._logo_1usvo_28{width:32px}._background_1usvo_10 ._header_1usvo_19 ._logotext_1usvo_31{margin-left:10px;font-size:20px;line-height:20px}._background_1usvo_10 ._header_1usvo_19 ._menus_1usvo_36{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;margin-right:50px;font-size:16px;flex:1}._background_1usvo_10 ._header_1usvo_19 ._menus_1usvo_36 ._menublock_1usvo_45{display:flex;flex-direction:row;align-items:center;margin-left:30px;border-bottom:2px solid transparent;height:60px;color:#d0d6e0;box-sizing:border-box;cursor:pointer}._background_1usvo_10 ._header_1usvo_19 ._menus_1usvo_36 ._menublock_1usvo_45 ._menublockimg_1usvo_56{margin-right:8px;width:20px}._background_1usvo_10 ._header_1usvo_19 ._menus_1usvo_36 ._menublock_1usvo_45:hover,._background_1usvo_10 ._header_1usvo_19 ._menus_1usvo_36 ._menublockselect_1usvo_64{border-color:#fff;color:#fff}._background_1usvo_10 ._header_1usvo_19 ._userview_1usvo_68{cursor:pointer;display:flex;align-items:center;gap:14px}._background_1usvo_10 ._header_1usvo_19 ._userview_1usvo_68 ._version_1usvo_75{color:#9297a0;font-size:12px;line-height:1;padding:3px 8px;border:1px solid #3a3f48;border-radius:10px;background:rgba(255,255,255,.04);white-space:nowrap}._background_1usvo_10 ._header_1usvo_19 ._userview_1usvo_68 ._screenEntry_1usvo_85{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:6px;color:#9297a0;font-size:16px;line-height:1;transition:color .2s,background .2s}._background_1usvo_10 ._header_1usvo_19 ._userview_1usvo_68 ._screenEntry_1usvo_85:hover{color:#fff;background:rgba(255,255,255,.08)}._background_1usvo_10 ._bottom_1usvo_101{display:flex;flex-direction:row;width:100%;height:calc(100% - 60px);box-sizing:border-box}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108{display:flex;flex-direction:column;background-color:#1d1f25;transition:width .2s ease;overflow:hidden}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._menuWrap_1usvo_115{flex:1;overflow-y:auto;overflow-x:hidden}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._menuWrap_1usvo_115::-webkit-scrollbar{width:4px}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._menuWrap_1usvo_115::-webkit-scrollbar-thumb{background:#3a3f48;border-radius:2px}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._menuIcon_1usvo_127{display:inline-block;width:16px;height:16px;background-color:currentColor;mask-size:contain;mask-repeat:no-repeat;mask-position:center;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;-webkit-mask-position:center}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._sliderFooter_1usvo_139{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;height:48px;border-top:1px solid #2a2d35;color:#d0d6e0;font-size:14px;cursor:pointer;user-select:none;flex-shrink:0}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._sliderFooter_1usvo_139:hover{background-color:#23262e;color:#fff}._background_1usvo_10 ._bottom_1usvo_101 ._slider_1usvo_108 ._sliderFooter_1usvo_139 ._collapseText_1usvo_157{white-space:nowrap}._background_1usvo_10 ._bottom_1usvo_101 ._right_1usvo_160{display:flex;flex-direction:column;padding:0 40px;flex:1;width:0;box-sizing:border-box;background-color:#f8fafc}._background_1usvo_10 ._bottom_1usvo_101 ._right_1usvo_160 ._route_1usvo_169{display:flex;flex-direction:row;align-items:center;height:44px}._background_1usvo_10 ._bottom_1usvo_101 ._right_1usvo_160 ._route_1usvo_169 ._breadcrumb_1usvo_175{color:#333840}._background_1usvo_10 ._bottom_1usvo_101 ._right_1usvo_160 ._contentview_1usvo_178{overflow:auto;height:calc(100% - 84px);padding:20px;box-sizing:border-box;background-color:#fff;border:1px solid #dddddd;border-radius:12px}\n",document.head.appendChild(o),e("default",(function(){const e=s(),o=_(),g=r.useRef(),[p,f]=r.useState([]),[I,K]=r.useState(!1),[E,P]=r.useState({selectKeys:[],openKeys:[]}),W=r.useCallback((e=>n.jsx("a",{href:e.path,style:{color:"unset",fontSize:16},children:e.title},e.path)),[]),F=r.useCallback(((e,o)=>{const s=o&&e.selectIcon||e.icon;if(s)return"string"!=typeof s?s:n.jsx("i",{className:C.menuIcon,style:{maskImage:`url(${s})`,WebkitMaskImage:`url(${s})`}})}),[]);r.useEffect((()=>{const{routes:o}=y(e.pathname),s=[...o];s.pop(),P({openKeys:s.map((e=>e.fullPath)),selectKeys:o.map((e=>e.fullPath))})}),[e.pathname]),r.useEffect((()=>{const e=j.find((e=>"系统"===e.name)),o=e?.children?.find((e=>"后台管理系统"===e.name)),s=o?.children?.find((e=>"后台管理系统"===e.name));f(s?.children||[])}),[]);const M=r.useMemo((()=>{const o=(e,s,_=[])=>e.filter((e=>e.name&&!e.hideInMenu)).reduce(((e,r)=>{if(e)return e;const n=[..._,r];if(r.fullPath===s)return n;if(r.children?.length){const e=o(r.children,s,n);if(e)return e}return null}),null);return o(p,e.pathname)||[]}),[p,e.pathname]),S=(e,o=[])=>e.filter((e=>e.name&&!e.hideInMenu)).map((e=>{const s=E.selectKeys.includes(e.fullPath);return e.children?.filter((e=>e.name&&!e.hideInMenu)).length>0?{key:e.fullPath,icon:F(e,s),label:e.name,children:S(e.children,[...o,e])}:{key:e.fullPath,icon:F(e,s),label:e.name}})),R=[{key:"logout",label:"退出系统",icon:n.jsx(k,{}),onClick:()=>{N.admin.user.logout().then((s=>{s&&o(`/login?redirect=${encodeURIComponent(e.pathname+e.search)}`)}))}}];return n.jsx(t,{locale:i,theme:z,children:n.jsx("div",{style:{width:"100vw",height:"100vh"},children:n.jsxs("div",{className:C.background,ref:g,children:[n.jsxs("div",{className:C.header,children:[n.jsx("img",{className:C.logo,alt:"logo",src:"/logo.svg"}),n.jsx("span",{className:C.logotext,children:w.title}),n.jsx("div",{style:{flex:1}}),n.jsxs("div",{className:C.userview,children:[n.jsx("span",{className:C.version,children:"v1.0.0"}),n.jsx("button",{type:"button",className:C.screenEntry,title:"进入大屏",onClick:()=>o("/screen"),children:n.jsx(u,{})}),n.jsx(l,{menu:{items:R},children:n.jsxs("div",{className:C.userInfo,children:[n.jsx(a,{style:{backgroundColor:"transparent",border:"2px solid #d1d1d1"},icon:n.jsx(c,{})}),n.jsx("span",{style:{margin:"0 10px"},children:"admin"}),n.jsx(d,{})]})})]})]}),n.jsxs("div",{className:C.bottom,children:[n.jsxs("div",{className:C.slider,style:{width:I?64:240},children:[n.jsx("div",{className:C.menuWrap,children:n.jsx(v,{mode:"inline",inlineCollapsed:I,items:S(p),onSelect:e=>{o(e.key)},selectedKeys:E.selectKeys,openKeys:I?[]:E.openKeys,onOpenChange:e=>{P({...E,openKeys:e})}})}),n.jsxs("div",{className:C.sliderFooter,onClick:()=>K((e=>!e)),role:"button",tabIndex:0,children:[I?n.jsx(m,{}):n.jsx(h,{}),!I&&n.jsx("span",{className:C.collapseText,children:"收起菜单"})]})]}),n.jsxs("div",{className:C.right,children:[n.jsx("div",{className:C.route,children:n.jsx(b,{items:M.map((e=>({key:e.name,title:e.name,path:e.fullPath}))),className:C.breadcrumb,itemRender:W})}),n.jsx("div",{className:C.contentview,children:n.jsx(x,{})})]})]})]})})})}));const C={background:"_background_1usvo_10",header:"_header_1usvo_19",logo:"_logo_1usvo_28",logotext:"_logotext_1usvo_31",menus:"_menus_1usvo_36",menublock:"_menublock_1usvo_45",menublockimg:"_menublockimg_1usvo_56",menublockselect:"_menublockselect_1usvo_64",userview:"_userview_1usvo_68",version:"_version_1usvo_75",screenEntry:"_screenEntry_1usvo_85",bottom:"_bottom_1usvo_101",slider:"_slider_1usvo_108",menuWrap:"_menuWrap_1usvo_115",menuIcon:"_menuIcon_1usvo_127",sliderFooter:"_sliderFooter_1usvo_139",collapseText:"_collapseText_1usvo_157",right:"_right_1usvo_160",route:"_route_1usvo_169",breadcrumb:"_breadcrumb_1usvo_175",contentview:"_contentview_1usvo_178"};g.locale(p),f.object}}}));
|