1 |
- import{d as W,u as Le,S as ne,F as re,_ as D,B as U,o as Ce,G as Ge,H as Je,f as ke,L as Z,I as Ze,J as xe,K as N,M as Me,N as Qe,e as De,h as et,O as he,r as Ee,P as Ie,Q as tt,g as me,A as ot}from"./index-ba596ae9.js";import{h as A,a1 as X,k as e,p as i,l as $,a4 as R,m as le,V as T,M as k,a2 as q,t as _,U as J,T as L,N as a,q as n,o as m,y as ae,r as j,j as Q,B as Y,ac as ce,O as te,n as ee,A as Ae,a6 as K,ad as Ne,ae as we,af as nt,$ as se,W as I,a5 as Pe,X as qe,Y as We,F as Ue,ag as lt,x as Re,ah as at,a7 as Te,ai as st,aj as Se,ak as He,Z as rt,al as ct,i as ut}from"./vue-a39e6937.js";import{_ as it,D as dt}from"./darkSwitch-2d22b024.js";import{c as mt,o as Be,g as Oe,r as _e,s as _t,a as pt}from"./router-1773feb7.js";import{I as ft}from"./index-434d719f.js";import{a as vt}from"./useDark-be37a710.js";import{a as yt,i as gt}from"./index-465c298e.js";import{F as ie}from"./index-f0d8af94.js";import{m as bt}from"./layout-df994644.js";import"./controllerUrls-941681c3.js";import"./index-7e56a0fa.js";const ht={class:"layout-logo"},Ct={key:0,class:"logo-img",src:it,alt:"logo"},kt=A({__name:"logo",setup(y){X(u=>({"7ccdc331":e(t).layout.layoutMode!="Streamline"?e(t).getColorVal("menuTopBarBackground"):"transparent"}));const t=W(),o=Le(),c=function(){t.layout.shrink&&!t.layout.menuCollapse&&mt(),t.setLayout("menuCollapse",!t.layout.menuCollapse),ne.set(re,{layoutMode:t.layout.layoutMode,menuCollapse:t.layout.menuCollapse})};return(u,d)=>{const b=_("Icon");return i(),$("div",ht,[e(t).layout.menuCollapse?R("",!0):(i(),$("img",Ct)),e(t).layout.menuCollapse?R("",!0):(i(),$("div",{key:1,style:le({color:e(t).getColorVal("menuActiveColor")}),class:"website-name"},T(e(o).siteName),5)),e(t).layout.layoutMode!="Streamline"?(i(),k(b,{key:2,onClick:c,name:e(t).layout.menuCollapse?"fa fa-indent":"fa fa-dedent",class:q([e(t).layout.menuCollapse?"unfold":"","fold"]),color:e(t).getColorVal("menuActiveColor"),size:"18"},null,8,["name","class","color"])):R("",!0)])}}});const Ke=D(kt,[["__scopeId","data-v-2bc92dbe"]]),xt=A({__name:"menuTree",props:{menus:{default:()=>[]}},setup(y){const t=y;X(c=>({"7ba097d8":e(o).getColorVal("menuActiveBackground")}));const o=W();return(c,u)=>{const d=_("Icon"),b=_("menu-tree",!0),g=_("el-sub-menu"),w=_("el-menu-item");return i(!0),$(L,null,J(t.menus,r=>(i(),$(L,null,[r.children&&r.children.length>0?(i(),k(g,{index:r.path,key:r.path},{title:a(()=>{var p,f,l,s;return[n(d,{color:e(o).getColorVal("menuColor"),name:(p=r.meta)!=null&&p.icon?(f=r.meta)==null?void 0:f.icon:e(o).layout.menuDefaultIcon},null,8,["color","name"]),m("span",null,T((l=r.meta)!=null&&l.title?(s=r.meta)==null?void 0:s.title:c.$t("noTitle")),1)]}),default:a(()=>[n(b,{menus:r.children},null,8,["menus"])]),_:2},1032,["index"])):(i(),k(w,{index:r.path,key:r.path,onClick:p=>e(Be)(r)},{default:a(()=>{var p,f,l,s;return[n(d,{color:e(o).getColorVal("menuColor"),name:(p=r.meta)!=null&&p.icon?(f=r.meta)==null?void 0:f.icon:e(o).layout.menuDefaultIcon},null,8,["color","name"]),m("span",null,T((l=r.meta)!=null&&l.title?(s=r.meta)==null?void 0:s.title:c.$t("noTitle")),1)]}),_:2},1032,["index","onClick"]))],64))),256)}}});const pe=D(xt,[["__scopeId","data-v-7d9e0735"]]),wt=A({__name:"menuVertical",setup(y){X(r=>({"1dde85aa":e(b),"72fdaa31":e(t).getColorVal("menuBackground"),b0a765a4:e(t).getColorVal("menuColor"),"4fe2d048":e(t).getColorVal("menuActiveColor")}));const t=W(),o=U(),c=te(),u=ae(),d=j({defaultActive:""}),b=Q(()=>{let r=0;return t.layout.menuShowTopBar&&(r=50),t.layout.layoutMode=="Default"?"calc(100vh - "+(32+r)+"px)":"calc(100vh - "+r+"px)"}),g=r=>{d.defaultActive=r.path},w=()=>{ee(()=>{var p;let r=document.querySelector(".el-menu.layouts-menu-vertical li.is-active");if(!r)return!1;(p=u.value)==null||p.setScrollTop(r.offsetTop)})};return Y(()=>{g(c),w()}),ce(r=>{g(r)}),(r,p)=>{const f=_("el-menu"),l=_("el-scrollbar");return i(),k(l,{ref_key:"verticalMenusRef",ref:u,class:"vertical-menus-scrollbar"},{default:a(()=>[n(f,{class:"layouts-menu-vertical","collapse-transition":!1,"unique-opened":e(t).layout.menuUniqueOpened,"default-active":d.defaultActive,collapse:e(t).layout.menuCollapse},{default:a(()=>[n(pe,{menus:e(o).state.tabsViewRoutes},null,8,["menus"])]),_:1},8,["unique-opened","default-active","collapse"])]),_:1},512)}}});const $e=(y,t)=>{for(let o=0;o<t.length;o++){const c=t[o];if(c.path==y||c.children&&c.children.length>0&&$e(y,c.children))return c}return!1},Tt=A({__name:"menuVerticalChildren",setup(y){X(r=>({"6cb75450":e(b),"6f812742":e(t).getColorVal("menuBackground"),"08696640":e(t).getColorVal("menuColor"),ba4d584c:e(t).getColorVal("menuActiveColor")}));const t=W(),o=U(),c=te(),u=ae(),d=j({defaultActive:"",routeChildren:[]}),b=Q(()=>{let r=0;return t.layout.menuShowTopBar&&(r=50),t.layout.layoutMode=="Default"?"calc(100vh - "+(32+r)+"px)":"calc(100vh - "+r+"px)"}),g=r=>{let p=$e(r.path,o.state.tabsViewRoutes);p?(d.defaultActive=r.path,p.children&&p.children.length>0?d.routeChildren=p.children:d.routeChildren=[p]):d.routeChildren||(d.routeChildren=o.state.tabsViewRoutes)},w=()=>{ee(()=>{var p;let r=document.querySelector(".el-menu.layouts-menu-vertical-children li.is-active");if(!r)return!1;(p=u.value)==null||p.setScrollTop(r.offsetTop)})};return Y(()=>{g(c),w()}),ce(r=>{g(r)}),(r,p)=>{const f=_("el-menu"),l=_("el-scrollbar");return i(),k(l,{ref_key:"verticalMenusRef",ref:u,class:"children-vertical-menus-scrollbar"},{default:a(()=>[n(f,{class:"layouts-menu-vertical-children","collapse-transition":!1,"unique-opened":e(t).layout.menuUniqueOpened,"default-active":d.defaultActive,collapse:e(t).layout.menuCollapse},{default:a(()=>[d.routeChildren.length>0?(i(),k(pe,{key:0,menus:d.routeChildren},null,8,["menus"])):R("",!0)]),_:1},8,["unique-opened","default-active","collapse"])]),_:1},512)}}});const St=A({name:"layout/aside"}),Bt=A({...St,setup(y){X(u=>({"4fc65662":e(c)}));const t=W(),o=U(),c=Q(()=>t.menuWidth());return(u,d)=>{const b=_("el-aside");return e(o).state.tabFullScreen?R("",!0):(i(),k(b,{key:0,class:q("layout-aside-"+e(t).layout.layoutMode+" "+(e(t).layout.shrink?"shrink":""))},{default:a(()=>[e(t).layout.menuShowTopBar?(i(),k(Ke,{key:0})):R("",!0),e(t).layout.layoutMode=="Double"?(i(),k(Tt,{key:1})):(i(),k(wt,{key:2}))]),_:1},8,["class"]))}}});const Ve=D(Bt,[["__scopeId","data-v-9423bcd6"]]);function je(){if(!Ae())throw new Error("useCurrentInstance() can only be used inside setup() or functional components!");const{appContext:y}=Ae();return{proxy:y.config.globalProperties}}const $t={class:"el-dropdown-menu"},Vt=["onClick"],Mt=A({__name:"index",props:{width:{default:150},items:{default:()=>[]}},emits:["contextmenuItemClick"],setup(y,{expose:t,emit:o}){const c=y,u=j({show:!1,axis:{x:0,y:0},menu:void 0,arrowAxis:10}),d=(w,r)=>{u.menu=w,u.axis=r,u.show=!0},b=w=>{w.disabled||(w.menu=nt(u.menu),o("contextmenuItemClick",w))},g=()=>{u.show=!1};return t({onShowContextmenu:d,onHideContextmenu:g}),Y(()=>{Ce(document,"click",g)}),(w,r)=>{const p=_("Icon");return i(),k(we,{name:"el-zoom-in-center"},{default:a(()=>[K((i(),$("div",{class:"el-popper is-pure is-light el-dropdown__popper ba-contextmenu",style:le(`top: ${u.axis.y+5}px;left: ${u.axis.x-14}px;width:${c.width}px`),key:Math.random(),"aria-hidden":"false","data-popper-placement":"bottom"},[m("ul",$t,[(i(!0),$(L,null,J(c.items,(f,l)=>(i(),$("li",{key:l,class:q(["el-dropdown-menu__item",f.disabled?"is-disabled":""]),tabindex:"-1",onClick:s=>b(f)},[n(p,{size:"12",name:f.icon},null,8,["name"]),m("span",null,T(f.label),1)],10,Vt))),128))]),m("span",{class:"el-popper__arrow",style:le({left:`${u.arrowAxis}px`})},null,4)],4)),[[Ne,u.show]])]),_:1})}}});const It=D(Mt,[["__scopeId","data-v-f1121b30"]]),At=["onClick","onContextmenu"],Rt=A({__name:"tabs",setup(y){X(v=>({"31b5539f":e(c).getColorVal("headerBarTabColor"),"2e2f7df9":e(c).getColorVal("headerBarTabActiveColor"),"259678a4":e(c).layout.layoutMode=="Default"?"none":e(c).getColorVal("headerBarBackground")}));const t=te(),o=Pe(),c=W(),u=U(),{proxy:d}=je(),b=ae(),g=Ge(),w=ae(),r=j({contextmenuItems:[{name:"refresh",label:"重新加载",icon:"fa fa-refresh"},{name:"close",label:"关闭标签",icon:"fa fa-times"},{name:"fullScreen",label:"当前标签全屏",icon:"el-icon-FullScreen"},{name:"closeOther",label:"关闭其他标签",icon:"fa fa-minus"},{name:"closeAll",label:"关闭全部标签",icon:"fa fa-stop"}]}),p=j({width:"0",transform:"translateX(0px)"}),f=v=>{o.push(v)},l=(v,B)=>{r.contextmenuItems[0].disabled=t.path!==v.path,r.contextmenuItems[4].disabled=r.contextmenuItems[3].disabled=u.state.tabsView.length==1;const{clientX:V,clientY:H}=B;w.value.onShowContextmenu(v,{x:V,y:H})},s=function(v){if(!v)return!1;p.width=v.clientWidth+"px",p.transform=`translateX(${v.offsetLeft}px)`;let B=v.offsetLeft+v.clientWidth-b.value.clientWidth;v.offsetLeft<b.value.scrollLeft?b.value.scrollTo(v.offsetLeft,0):B>b.value.scrollLeft&&b.value.scrollTo(B,0)},F=()=>{const v=u.state.tabsView.slice(-1)[0];v?o.push(v.path):o.push("/admin")},E=v=>{var B;u.closeTab(v),d.eventBus.emit("onTabViewClose",v),((B=u.state.activeRoute)==null?void 0:B.path)===v.path?F():(u.setActiveRoute(u.state.activeRoute),ee(()=>{s(g.value[u.state.activeIndex])})),w.value.onHideContextmenu()},x=v=>{var B;u.closeTabs(v),u.setActiveRoute(v),((B=u.state.activeRoute)==null?void 0:B.path)!==t.path&&o.push(v.path)},C=v=>{let B=Oe(u.state.tabsViewRoutes);if(B&&B.path==v.path)return x(v);u.closeTabs(!1),B&&_e(B.path)},z=async v=>{const{name:B,menu:V}=v;if(V)switch(B){case"refresh":d.eventBus.emit("onTabViewRefresh",V);break;case"close":E(V);break;case"closeOther":x(V);break;case"closeAll":C(V);break;case"fullScreen":t.path!==(V==null?void 0:V.path)&&o.push(V==null?void 0:V.path),u.setFullScreen(!0);break}},M=function(v){u.addTab(v),u.setActiveRoute(v),ee(()=>{s(g.value[u.state.activeIndex])})};return ce(async v=>{M(v)}),Y(()=>{M(o.currentRoute.value),new Je(b.value)}),(v,B)=>{const V=_("Icon");return i(),$(L,null,[m("div",{class:"nav-tabs",ref_key:"tabScrollbarRef",ref:b},[(i(!0),$(L,null,J(e(u).state.tabsView,(H,oe)=>(i(),$("div",{onClick:P=>f(H),onContextmenu:se(P=>l(H,P),["prevent"]),class:q(["ba-nav-tab",e(u).state.activeIndex==oe?"active":""]),ref_for:!0,ref:e(g).set,key:oe},[I(T(H.meta.title)+" ",1),n(we,{onAfterLeave:B[0]||(B[0]=P=>s(e(g)[e(u).state.activeIndex])),name:"el-fade-in"},{default:a(()=>[K(n(V,{class:"close-icon",onClick:se(P=>E(H),["stop"]),size:"15",name:"el-icon-Close"},null,8,["onClick"]),[[Ne,e(u).state.tabsView.length>1]])]),_:2},1024)],42,At))),128)),m("div",{style:le(p),class:"nav-tabs-active-box"},null,4)],512),n(It,{ref_key:"contextmenuRef",ref:w,items:r.contextmenuItems,onContextmenuItemClick:z},null,8,["items"])],64)}}});const Xe=D(Rt,[["__scopeId","data-v-1d396a22"]]),Fe=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],G=(()=>{if(typeof document>"u")return!1;const y=Fe[0],t={};for(const o of Fe)if((o==null?void 0:o[1])in document){for(const[u,d]of o.entries())t[y[u]]=d;return t}return!1})(),ze={change:G.fullscreenchange,error:G.fullscreenerror};let O={request(y=document.documentElement,t){return new Promise((o,c)=>{const u=()=>{O.off("change",u),o()};O.on("change",u);const d=y[G.requestFullscreen](t);d instanceof Promise&&d.then(u).catch(c)})},exit(){return new Promise((y,t)=>{if(!O.isFullscreen){y();return}const o=()=>{O.off("change",o),y()};O.on("change",o);const c=document[G.exitFullscreen]();c instanceof Promise&&c.then(o).catch(t)})},toggle(y,t){return O.isFullscreen?O.exit():O.request(y,t)},onchange(y){O.on("change",y)},onerror(y){O.on("error",y)},on(y,t){const o=ze[y];o&&document.addEventListener(o,t,!1)},off(y,t){const o=ze[y];o&&document.removeEventListener(o,t,!1)},raw:G};Object.defineProperties(O,{isFullscreen:{get:()=>!!document[G.fullscreenElement]},element:{enumerable:!0,get:()=>document[G.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[G.fullscreenEnabled]}});G||(O={isEnabled:!1});const de=O,fe=y=>(qe("data-v-bac0a267"),y=y(),We(),y),Ft={class:"layout-config-drawer"},zt={class:"layout-mode-styles-box"},Lt={class:"layout-mode-box-style"},Dt=fe(()=>m("div",{class:"layout-mode-style-box"},[m("div",{class:"layout-mode-style-aside"}),m("div",{class:"layout-mode-style-container-box"},[m("div",{class:"layout-mode-style-header"}),m("div",{class:"layout-mode-style-container"})])],-1)),Et={class:"layout-mode-style-name"},Nt=fe(()=>m("div",{class:"layout-mode-style-box"},[m("div",{class:"layout-mode-style-aside"}),m("div",{class:"layout-mode-style-container-box"},[m("div",{class:"layout-mode-style-header"}),m("div",{class:"layout-mode-style-container"})])],-1)),Pt={class:"layout-mode-style-name"},qt=fe(()=>m("div",{class:"layout-mode-style-box"},[m("div",{class:"layout-mode-style-container-box"},[m("div",{class:"layout-mode-style-header"}),m("div",{class:"layout-mode-style-container"})])],-1)),Wt={class:"layout-mode-style-name"},Ut=fe(()=>m("div",{class:"layout-mode-style-box"},[m("div",{class:"layout-mode-style-aside"}),m("div",{class:"layout-mode-style-container-box"},[m("div",{class:"layout-mode-style-header"}),m("div",{class:"layout-mode-style-container"})])],-1)),Ht={class:"layout-mode-style-name"},Ot={class:"layout-config-global"},Kt={class:"layout-config-aside"},jt={class:"layout-config-aside"},Xt={class:"ba-center"},Yt=A({__name:"config",setup(y){const{t}=ke(),o=W(),c=U(),u=Pe(),d=(f,l)=>{o.setLayout(l,f)},b=(f,l)=>{if(f===null)return;const s=o.layout[l];o.layout.isDark?s[1]=f:s[0]=f,o.setLayout(l,s)},g=f=>{ne.set(re,{layoutMode:f,menuCollapse:o.layout.menuCollapse}),o.setLayoutMode(f)},w=(f,l)=>{o.setLayout(l,f);const s=c.state.tabsViewRoutes;c.setTabsViewRoutes([]),setTimeout(()=>{c.setTabsViewRoutes(s)},200)},r=()=>{o.setLayout("showDrawer",!1)},p=()=>{Z.remove(Ze),ne.remove(re),u.go(0)};return(f,l)=>{const s=_("el-divider"),F=_("el-col"),E=_("el-row"),x=_("el-form-item"),C=_("el-option"),z=_("el-select"),M=_("el-color-picker"),v=_("el-switch"),B=_("el-input"),V=_("el-button"),H=_("el-popconfirm"),oe=_("el-form"),P=_("el-scrollbar"),h=_("el-drawer");return i(),$("div",Ft,[n(h,{"model-value":e(o).layout.showDrawer,title:e(t)("layouts.Layout configuration"),size:"310px",onClose:r},{default:a(()=>[n(P,{class:"layout-mode-style-scrollbar"},{default:a(()=>[n(oe,{ref:"formRef",model:e(o).layout},{default:a(()=>[m("div",zt,[n(s,{"border-style":"dashed"},{default:a(()=>[I(T(e(t)("layouts.Layout mode")),1)]),_:1}),m("div",Lt,[n(E,{class:"layout-mode-box-style-row",gutter:10},{default:a(()=>[n(F,{span:12},{default:a(()=>[m("div",{onClick:l[0]||(l[0]=S=>g("Default")),class:q(["layout-mode-style default",e(o).layout.layoutMode=="Default"?"active":""])},[Dt,m("div",Et,T(e(t)("layouts.default")),1)],2)]),_:1}),n(F,{span:12},{default:a(()=>[m("div",{onClick:l[1]||(l[1]=S=>g("Classic")),class:q(["layout-mode-style classic",e(o).layout.layoutMode=="Classic"?"active":""])},[Nt,m("div",Pt,T(e(t)("layouts.classic")),1)],2)]),_:1})]),_:1}),n(E,{gutter:10},{default:a(()=>[n(F,{span:12},{default:a(()=>[m("div",{onClick:l[2]||(l[2]=S=>g("Streamline")),class:q(["layout-mode-style streamline",e(o).layout.layoutMode=="Streamline"?"active":""])},[qt,m("div",Wt,T(e(t)("layouts.Single column")),1)],2)]),_:1}),n(F,{span:12},{default:a(()=>[m("div",{onClick:l[3]||(l[3]=S=>g("Double")),class:q(["layout-mode-style double",e(o).layout.layoutMode=="Double"?"active":""])},[Ut,m("div",Ht,T(e(t)("layouts.Double column")),1)],2)]),_:1})]),_:1})]),n(s,{"border-style":"dashed"},{default:a(()=>[I(T(e(t)("layouts.overall situation")),1)]),_:1}),m("div",Ot,[n(x,{size:"large",label:e(t)("layouts.Dark mode")},{default:a(()=>[n(dt,{onClick:l[4]||(l[4]=S=>e(vt)())})]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Background page switching animation")},{default:a(()=>[n(z,{onChange:l[5]||(l[5]=S=>d(S,"mainAnimation")),"model-value":e(o).layout.mainAnimation,placeholder:e(t)("layouts.Please select an animation name")},{default:a(()=>[n(C,{label:"slide-right",value:"slide-right"}),n(C,{label:"slide-left",value:"slide-left"}),n(C,{label:"el-fade-in-linear",value:"el-fade-in-linear"}),n(C,{label:"el-fade-in",value:"el-fade-in"}),n(C,{label:"el-zoom-in-center",value:"el-zoom-in-center"}),n(C,{label:"el-zoom-in-top",value:"el-zoom-in-top"}),n(C,{label:"el-zoom-in-bottom",value:"el-zoom-in-bottom"})]),_:1},8,["model-value","placeholder"])]),_:1},8,["label"])]),n(s,{"border-style":"dashed"},{default:a(()=>[I(T(e(t)("layouts.sidebar")),1)]),_:1}),m("div",Kt,[n(x,{label:e(t)("layouts.Side menu bar background color")},{default:a(()=>[n(M,{onChange:l[6]||(l[6]=S=>b(S,"menuBackground")),"model-value":e(o).getColorVal("menuBackground")},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Side menu text color")},{default:a(()=>[n(M,{onChange:l[7]||(l[7]=S=>b(S,"menuColor")),"model-value":e(o).getColorVal("menuColor")},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Side menu active item background color")},{default:a(()=>[n(M,{onChange:l[8]||(l[8]=S=>b(S,"menuActiveBackground")),"model-value":e(o).getColorVal("menuActiveBackground")},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Side menu active item text color")},{default:a(()=>[n(M,{onChange:l[9]||(l[9]=S=>b(S,"menuActiveColor")),"model-value":e(o).getColorVal("menuActiveColor")},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Show side menu top bar (logo bar)")},{default:a(()=>[n(v,{onChange:l[10]||(l[10]=S=>d(S,"menuShowTopBar")),"model-value":e(o).layout.menuShowTopBar},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Side menu top bar background color")},{default:a(()=>[n(M,{onChange:l[11]||(l[11]=S=>b(S,"menuTopBarBackground")),"model-value":e(o).getColorVal("menuTopBarBackground")},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Side menu width (when expanded)")},{default:a(()=>[n(B,{onInput:l[12]||(l[12]=S=>d(S,"menuWidth")),type:"number",step:10,"model-value":e(o).layout.menuWidth},{append:a(()=>[I("px")]),_:1},8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Side menu default icon")},{default:a(()=>[n(ft,{onChange:l[13]||(l[13]=S=>w(S,"menuDefaultIcon")),"model-value":e(o).layout.menuDefaultIcon},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Side menu horizontal collapse")},{default:a(()=>[n(v,{onChange:l[14]||(l[14]=S=>d(S,"menuCollapse")),"model-value":e(o).layout.menuCollapse},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Side menu accordion")},{default:a(()=>[n(v,{onChange:l[15]||(l[15]=S=>d(S,"menuUniqueOpened")),"model-value":e(o).layout.menuUniqueOpened},null,8,["model-value"])]),_:1},8,["label"])]),n(s,{"border-style":"dashed"},{default:a(()=>[I(T(e(t)("layouts.Top bar")),1)]),_:1}),m("div",jt,[n(x,{label:e(t)("layouts.Top bar background color")},{default:a(()=>[n(M,{onChange:l[16]||(l[16]=S=>b(S,"headerBarBackground")),"model-value":e(o).getColorVal("headerBarBackground")},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Top bar text color")},{default:a(()=>[n(M,{onChange:l[17]||(l[17]=S=>b(S,"headerBarTabColor")),"model-value":e(o).getColorVal("headerBarTabColor")},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Background color when hovering over the top bar")},{default:a(()=>[n(M,{onChange:l[18]||(l[18]=S=>b(S,"headerBarHoverBackground")),"model-value":e(o).getColorVal("headerBarHoverBackground")},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Top bar menu active item background color")},{default:a(()=>[n(M,{onChange:l[19]||(l[19]=S=>b(S,"headerBarTabActiveBackground")),"model-value":e(o).getColorVal("headerBarTabActiveBackground")},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Top bar menu active item text color")},{default:a(()=>[n(M,{onChange:l[20]||(l[20]=S=>b(S,"headerBarTabActiveColor")),"model-value":e(o).getColorVal("headerBarTabActiveColor")},null,8,["model-value"])]),_:1},8,["label"])]),n(H,{onConfirm:p,title:e(t)("layouts.Are you sure you want to restore all configurations to the default values?")},{reference:a(()=>[m("div",Xt,[n(V,{class:"w80",type:"info"},{default:a(()=>[I(T(e(t)("layouts.Restore default")),1)]),_:1})])]),_:1},8,["title"])])]),_:1},8,["model"])]),_:1})]),_:1},8,["model-value","title"])])}}});const Gt=D(Yt,[["__scopeId","data-v-bac0a267"]]),Jt={class:"command"},Zt={class:"task-opt"},Qt=["onClick"],eo={class:"indent-2"},to={class:"package-manager-dialog-footer"},oo={class:"config-buttons"},no=A({__name:"index",setup(y){const{t}=ke(),o=xe(),c=j({terminalWarning:"",port:o.state.port,menuExpand:document.documentElement.clientWidth>1840}),u=Q(()=>{let l=o.state.port==""?"80":o.state.port;return l=="8000"?"php think run":"php think run -p "+l}),d=Q(()=>{let l=o.state.port==""?"":":"+o.state.port;return"http://localhost"+l+" "+t("terminal.or")+" http://"+t("terminal.Site domain name")+l}),b=l=>{Me({port:l}).then(s=>{s.code==1?(o.changePort(l),f()):c.port=o.state.port}).catch(()=>{c.port=o.state.port})},g=l=>{let s=t("terminal.unknown"),F="info";switch(l){case N.Waiting:s=t("terminal.Waiting for execution"),F="info";break;case N.Connecting:s=t("terminal.Connecting"),F="warning";break;case N.Executing:s=t("terminal.Executing"),F="warning";break;case N.Success:s=t("terminal.Successful execution"),F="success";break;case N.Failed:s=t("terminal.Execution failed"),F="danger";break;case N.Unknown:s=t("terminal.Unknown execution result"),F="danger";break}return{statusText:s,statusType:F}},w=()=>{at.confirm(t("terminal.Are you sure you want to republish?"),t("Reminder"),{confirmButtonText:t("Confirm"),cancelButtonText:t("Cancel"),type:"warning"}).then(()=>{o.addTaskPM("web-build")})},r=l=>{Me({manager:l}).then(s=>{s.code==1&&o.changePackageManager(l)}),o.togglePackageManagerDialog(!1)},p=l=>{c.terminalWarning=l},f=()=>{Qe()!=o.state.port?p(t("terminal.The current terminal is not running under the installation service, and some commands may not be executed")):p("")};return Ue(()=>o.state.port,l=>{l!=c.port&&(c.port=l,f())}),Y(()=>{f()}),(l,s)=>{const F=_("el-alert"),E=_("el-tag"),x=_("el-button"),C=_("Icon"),z=_("el-card"),M=_("el-timeline-item"),v=_("el-timeline"),B=_("el-empty"),V=_("el-button-group"),H=_("el-dialog"),oe=_("el-form"),P=Te("blur");return i(),$(L,null,[n(H,lt(l.$attrs,{modelValue:e(o).state.show,"onUpdate:modelValue":s[7]||(s[7]=h=>e(o).state.show=h),title:e(t)("terminal.Terminal"),class:"ba-terminal-dialog","append-to-body":!0}),{default:a(()=>[c.terminalWarning?(i(),k(F,{key:0,class:"terminal-warning-alert",title:c.terminalWarning,type:"error"},null,8,["title"])):R("",!0),e(o).state.taskList.length?(i(),k(v,{key:1},{default:a(()=>[(i(!0),$(L,null,J(e(o).state.taskList,(h,S)=>(i(),k(M,{key:S,class:q(["task-item","task-status-"+h.status]),type:g(h.status).statusType,center:"",timestamp:h.createtime,placement:"top"},{default:a(()=>[n(z,null,{default:a(()=>[m("div",null,[n(E,{type:g(h.status).statusType},{default:a(()=>[I(T(g(h.status).statusText),1)]),_:2},1032,["type"]),(h.status==e(N).Failed||h.status==e(N).Unknown)&&h.blockOnFailure?(i(),k(E,{key:0,class:"block-on-failure-tag",type:"warning"},{default:a(()=>[I(T(e(t)("terminal.Failure to execute this command will block the execution of the queue")),1)]),_:1})):R("",!0),h.status==e(N).Executing||h.status==e(N).Connecting?(i(),k(E,{key:1,class:"block-on-failure-tag",type:"danger"},{default:a(()=>[I(T(e(t)("terminal.Do not refresh the browser")),1)]),_:1})):R("",!0),m("span",Jt,T(h.command),1),m("div",Zt,[h.status==e(N).Failed||h.status==e(N).Unknown?K((i(),k(x,{key:0,title:e(t)("Retry"),size:"small",type:"warning",icon:"el-icon-RefreshRight",circle:"",onClick:ue=>e(o).retryTask(S)},null,8,["title","onClick"])),[[P]]):R("",!0),K(n(x,{onClick:ue=>e(o).delTask(S),title:e(t)("delete"),size:"small",type:"danger",icon:"el-icon-Delete",circle:""},null,8,["onClick","title"]),[[P]])])]),h.status!=e(N).Waiting?(i(),$(L,{key:0},[h.status!=e(N).Connecting&&h.status!=e(N).Executing?(i(),$("div",{key:0,onClick:ue=>e(o).setTaskShowMessage(S),class:"toggle-message-display"},[m("span",null,T(e(t)("terminal.Command run log")),1),n(C,{name:h.showMessage?"el-icon-ArrowUp":"el-icon-ArrowDown",size:"16",color:"#909399"},null,8,["name"])],8,Qt)):R("",!0),h.status==e(N).Connecting||h.status==e(N).Executing||h.status>e(N).Executing&&h.showMessage?(i(),$("div",{key:1,class:q(["exec-message","exec-message-"+h.uuid])},[(i(!0),$(L,null,J(h.message,(ue,Ye)=>(i(),$("div",{key:Ye,class:"message-item"},T(ue),1))),128))],2)):R("",!0)],64)):R("",!0)]),_:2},1024)]),_:2},1032,["class","type","timestamp"]))),128))]),_:1})):(i(),k(B,{key:2,"image-size":80,description:e(t)("terminal.No mission yet")},null,8,["description"])),n(V,null,{default:a(()=>[K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-MagicStick",onClick:s[0]||(s[0]=h=>e(o).addTaskPM("test",!1))},{default:a(()=>[I(T(e(t)("terminal.Test command")),1)]),_:1})),[[P]]),K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-Download",onClick:s[1]||(s[1]=h=>e(o).addTaskPM("web-install"))},{default:a(()=>[I(T(e(t)("terminal.Install dependent packages")),1)]),_:1})),[[P]]),K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-Sell",onClick:s[2]||(s[2]=h=>w())},{default:a(()=>[I(T(e(t)("terminal.Republish")),1)]),_:1})),[[P]]),c.menuExpand?(i(),$(L,{key:1},[K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-Delete",onClick:s[4]||(s[4]=h=>e(o).clearSuccessTask())},{default:a(()=>[I(T(e(t)("terminal.Clean up task list")),1)]),_:1})),[[P]]),K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-Switch",onClick:s[5]||(s[5]=h=>e(o).togglePackageManagerDialog(!0))},{default:a(()=>[I(T(e(t)("terminal.Package manager"))+" "+T(e(o).state.packageManager.toUpperCase()),1)]),_:1})),[[P]]),K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-Tools",onClick:s[6]||(s[6]=h=>e(o).toggleConfigDialog())},{default:a(()=>[I(T(e(t)("terminal.Terminal settings")),1)]),_:1})),[[P]])],64)):K((i(),k(x,{key:0,class:"terminal-menu-item",icon:"el-icon-Expand",onClick:s[3]||(s[3]=h=>c.menuExpand=!0)},null,512)),[[P]])]),_:1})]),_:1},16,["modelValue","title"]),n(H,{onClose:s[14]||(s[14]=h=>e(o).togglePackageManagerDialog(!1)),"model-value":e(o).state.showPackageManagerDialog,class:"ba-terminal-dialog",title:e(t)("terminal.Please select package manager"),center:""},{footer:a(()=>[m("div",to,[n(x,{onClick:s[8]||(s[8]=h=>r("npm"))},{default:a(()=>[I("npm")]),_:1}),n(x,{onClick:s[9]||(s[9]=h=>r("cnpm"))},{default:a(()=>[I("cnpm")]),_:1}),n(x,{onClick:s[10]||(s[10]=h=>r("pnpm"))},{default:a(()=>[I("pnpm")]),_:1}),n(x,{onClick:s[11]||(s[11]=h=>r("yarn"))},{default:a(()=>[I("yarn")]),_:1}),n(x,{onClick:s[12]||(s[12]=h=>r("ni"))},{default:a(()=>[I("ni")]),_:1}),n(x,{onClick:s[13]||(s[13]=h=>r("none"))},{default:a(()=>[I(T(e(t)("terminal.I want to execute the command manually")),1)]),_:1})])]),default:a(()=>[m("div",eo,T(e(t)("terminal.Switch package manager title")),1)]),_:1},8,["model-value","title"]),n(H,{onClose:s[19]||(s[19]=h=>e(o).toggleConfigDialog(!1)),"model-value":e(o).state.showConfig,class:"ba-terminal-dialog",title:e(t)("terminal.Terminal settings")},{default:a(()=>[n(oe,{"label-position":"top"},{default:a(()=>[n(ie,{label:e(t)("terminal.Install service port"),modelValue:c.port,"onUpdate:modelValue":s[15]||(s[15]=h=>c.port=h),type:"number","input-attr":{onChange:b},placeholder:e(t)("terminal.The port number to start the installation service (this port needs to be opened for external network access)")},null,8,["label","modelValue","input-attr","placeholder"]),n(ie,{label:e(t)("terminal.Installation service startup command"),modelValue:e(u),"onUpdate:modelValue":s[16]||(s[16]=h=>Re(u)?u.value=h:null),type:"string","input-attr":{disabled:!0},attr:{"block-help":e(t)("terminal.Please execute this command to start the service (add Su under Linux)")}},null,8,["label","modelValue","attr"]),n(ie,{label:e(t)("terminal.Installation service URL"),modelValue:e(d),"onUpdate:modelValue":s[17]||(s[17]=h=>Re(d)?d.value=h:null),type:"string","input-attr":{disabled:!0},attr:{"block-help":e(t)("terminal.Please access the site through the installation service URL (except in debug mode)")}},null,8,["label","modelValue","attr"])]),_:1}),n(ie,{label:e(t)("terminal.Clean up successful tasks when starting a new task"),"model-value":e(o).state.automaticCleanupTask,type:"radio",data:{content:{0:e(t)("Disable"),1:e(t)("Enable")},childrenAttr:{border:!0}},"input-attr":{onChange:e(o).changeAutomaticCleanupTask}},null,8,["label","model-value","data","input-attr"]),m("div",oo,[n(x,{onClick:s[18]||(s[18]=h=>e(o).toggleConfigDialog(!1))},{default:a(()=>[I(T(e(t)("terminal.Back to terminal")),1)]),_:1})])]),_:1},8,["model-value","title"])],64)}}});const lo=D(no,[["__scopeId","data-v-0b70a3d1"]]),ao={class:"nav-menu-item"},so=["src"],ro={class:"admin-name"},co={class:"admin-info-base"},uo=["src"],io={class:"admin-info-other"},mo={class:"admin-info-name"},_o={class:"admin-info-lasttime"},po={class:"admin-info-footer"},fo=A({__name:"navMenus",setup(y){X(f=>({d45338c0:e(c).getColorVal("headerBarBackground"),"1d0a0a00":e(c).getColorVal("headerBarTabColor"),"38491e86":e(c).getColorVal("headerBarHoverBackground")}));const{t}=ke(),o=De(),c=W(),u=xe(),d=j({isFullScreen:!1,currentNavMenu:"",showLayoutDrawer:!1}),b=(f,l)=>{d.currentNavMenu=f?l:""},g=()=>{if(!de.isEnabled)return st.warning(t("layouts.Full screen is not supported")),!1;de.toggle(),de.onchange(()=>{d.isFullScreen=de.isFullscreen})},w=()=>{_e({name:"routine/adminInfo"})},r=()=>{yt().then(()=>{Z.remove(he),Ee.go(0)})},p=f=>{if(f=="storage"||f=="all"){const l=Z.get(he),s=Z.get(Ie);if(ne.clear(),Z.clear(),Z.set(he,l),Z.set(Ie,s),f=="storage")return}tt(f).then(()=>{})};return(f,l)=>{const s=_("Icon"),F=_("router-link"),E=_("el-dropdown-item"),x=_("el-dropdown-menu"),C=_("el-dropdown"),z=_("el-badge"),M=_("el-avatar"),v=_("el-button"),B=_("el-popover");return i(),$("div",{class:q(["nav-menus",e(c).layout.layoutMode])},[n(F,{class:"h100",target:"_blank",title:e(t)("Home"),to:"/"},{default:a(()=>[m("div",ao,[n(s,{color:e(c).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"el-icon-Monitor",size:"18"},null,8,["color"])])]),_:1},8,["title"]),n(C,{onVisibleChange:l[0]||(l[0]=V=>b(V,"lang")),class:"h100",size:"large","hide-timeout":50,placement:"bottom",trigger:"click","hide-on-click":!0},{dropdown:a(()=>[n(x,{class:"dropdown-menu-box"},{default:a(()=>[(i(!0),$(L,null,J(e(c).lang.langArray,V=>(i(),k(E,{key:V.name,onClick:H=>e(et)(V.name)},{default:a(()=>[I(T(V.value),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:a(()=>[m("div",{class:q(["nav-menu-item pt2",d.currentNavMenu=="lang"?"hover":""])},[n(s,{color:e(c).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"local-lang",size:"18"},null,8,["color"])],2)]),_:1}),m("div",{onClick:g,class:q(["nav-menu-item",d.isFullScreen?"hover":""])},[d.isFullScreen?(i(),k(s,{key:0,color:e(c).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"local-full-screen-cancel",size:"18"},null,8,["color"])):(i(),k(s,{key:1,color:e(c).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"el-icon-FullScreen",size:"18"},null,8,["color"]))],2),e(o).super?(i(),$("div",{key:0,onClick:l[1]||(l[1]=V=>e(u).toggle()),class:"nav-menu-item pt2"},[n(z,{"is-dot":e(u).state.showDot},{default:a(()=>[n(s,{color:e(c).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"local-terminal",size:"26"},null,8,["color"])]),_:1},8,["is-dot"])])):R("",!0),e(o).super?(i(),k(C,{key:1,onVisibleChange:l[5]||(l[5]=V=>b(V,"clear")),class:"h100",size:"large","hide-timeout":50,placement:"bottom",trigger:"click","hide-on-click":!0},{dropdown:a(()=>[n(x,{class:"dropdown-menu-box"},{default:a(()=>[n(E,{onClick:l[2]||(l[2]=V=>p("tp"))},{default:a(()=>[I(T(e(t)("utils.Clean up system cache")),1)]),_:1}),n(E,{onClick:l[3]||(l[3]=V=>p("storage"))},{default:a(()=>[I(T(e(t)("utils.Clean up browser cache")),1)]),_:1}),n(E,{onClick:l[4]||(l[4]=V=>p("all")),divided:""},{default:a(()=>[I(T(e(t)("utils.Clean up all cache")),1)]),_:1})]),_:1})]),default:a(()=>[m("div",{class:q(["nav-menu-item",d.currentNavMenu=="clear"?"hover":""])},[n(s,{color:e(c).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"el-icon-Delete",size:"18"},null,8,["color"])],2)]),_:1})):R("",!0),n(B,{onShow:l[6]||(l[6]=V=>b(!0,"adminInfo")),onHide:l[7]||(l[7]=V=>b(!1,"adminInfo")),placement:"bottom-end","hide-after":0,width:260,trigger:"click","popper-class":"admin-info-box"},{reference:a(()=>[m("div",{class:q(["admin-info",d.currentNavMenu=="adminInfo"?"hover":""])},[n(M,{size:25,fit:"fill"},{default:a(()=>[m("img",{src:e(o).avatar,alt:""},null,8,so)]),_:1}),m("div",ro,T(e(o).nickname),1)],2)]),default:a(()=>[m("div",null,[m("div",co,[n(M,{size:70,fit:"fill"},{default:a(()=>[m("img",{src:e(o).avatar,alt:""},null,8,uo)]),_:1}),m("div",io,[m("div",mo,T(e(o).nickname),1),m("div",_o,T(e(o).lastlogintime),1)])]),m("div",po,[n(v,{onClick:w,type:"primary",plain:""},{default:a(()=>[I(T(e(t)("layouts.personal data")),1)]),_:1}),n(v,{onClick:r,type:"danger",plain:""},{default:a(()=>[I(T(e(t)("layouts.cancellation")),1)]),_:1})])])]),_:1}),m("div",{onClick:l[8]||(l[8]=V=>e(c).setLayout("showDrawer",!0)),class:"nav-menu-item"},[n(s,{color:e(c).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"fa fa-cogs",size:"18"},null,8,["color"])]),n(Gt),n(lo)],2)}}});const ve=D(fo,[["__scopeId","data-v-e2acf89f"]]),vo={class:"nav-bar"},yo=A({__name:"default",setup(y){X(o=>({"341e91f0":e(t).getColorVal("headerBarTabColor"),"7d0afb8a":e(t).getColorVal("headerBarTabActiveColor"),"5eccd556":e(t).getColorVal("headerBarTabActiveBackground")}));const t=W();return(o,c)=>(i(),$("div",vo,[n(Xe),n(ve)]))}});const go=D(yo,[["__scopeId","data-v-8d90b156"]]),bo={class:"nav-bar"},ho={key:0,class:"unfold"},Co=A({__name:"classic",setup(y){X(c=>({"88b2895c":e(t).getColorVal("headerBarBackground"),"6a10a632":e(t).getColorVal("headerBarTabColor"),d50d5368:e(t).getColorVal("headerBarTabActiveColor"),"4c5473d8":e(t).getColorVal("headerBarHoverBackground"),a7c0b85a:e(t).getColorVal("headerBarTabActiveBackground")}));const t=W(),o=()=>{_t("ba-aside-menu-shade",()=>{t.setLayout("menuCollapse",!0)}),t.setLayout("menuCollapse",!1)};return(c,u)=>{const d=_("Icon");return i(),$("div",bo,[e(t).layout.shrink&&e(t).layout.menuCollapse?(i(),$("div",ho,[n(d,{onClick:o,name:"fa fa-indent",color:e(t).getColorVal("menuActiveColor"),size:"18"},null,8,["color"])])):R("",!0),e(t).layout.shrink?R("",!0):(i(),k(Xe,{key:1})),n(ve)])}}});const ko=D(Co,[["__scopeId","data-v-af750839"]]),xo={class:"layouts-menu-horizontal"},wo={key:0,class:"menu-horizontal-logo"},To=A({__name:"menuHorizontal",setup(y){X(r=>({"5a40796b":e(o).getColorVal("headerBarHoverBackground"),e2410298:e(o).getColorVal("menuBackground"),"0e7b1a6a":e(o).getColorVal("menuColor"),"9f88e7b6":e(o).getColorVal("menuActiveColor"),"447ba4cc":e(o).getColorVal("menuActiveBackground")}));const t=ae(),o=W(),c=U(),u=te(),d=j({menuKey:me(),defaultActive:""}),b=Q(()=>(d.menuKey=me(),c.state.tabsViewRoutes)),g=r=>{d.defaultActive=r.path},w=()=>{ee(()=>{var p;let r=document.querySelector(".el-menu.menu-horizontal li.is-active");if(!r)return!1;(p=t.value)==null||p.setScrollTop(r.offsetTop)})};return Y(()=>{g(u),w()}),ce(r=>{g(r)}),(r,p)=>{const f=_("Icon"),l=_("el-sub-menu"),s=_("el-menu-item"),F=_("el-menu"),E=_("el-scrollbar"),x=Te("blur");return i(),$("div",xo,[e(o).layout.menuShowTopBar?(i(),$("div",wo,[n(Ke)])):R("",!0),n(E,{ref_key:"horizontalMenusRef",ref:t,class:"horizontal-menus-scrollbar"},{default:a(()=>[(i(),k(F,{class:"menu-horizontal",mode:"horizontal","default-active":d.defaultActive,key:d.menuKey},{default:a(()=>[(i(!0),$(L,null,J(e(b),C=>(i(),$(L,null,[C.children&&C.children.length>0?(i(),k(l,{index:C.path,key:C.path},{title:a(()=>{var z,M,v,B;return[n(f,{color:e(o).getColorVal("menuColor"),name:(z=C.meta)!=null&&z.icon?(M=C.meta)==null?void 0:M.icon:e(o).layout.menuDefaultIcon},null,8,["color","name"]),m("span",null,T((v=C.meta)!=null&&v.title?(B=C.meta)==null?void 0:B.title:r.$t("noTitle")),1)]}),default:a(()=>[n(pe,{menus:C.children},null,8,["menus"])]),_:2},1032,["index"])):K((i(),k(s,{index:C.path,key:C.path,onClick:z=>e(Be)(C)},{default:a(()=>{var z,M,v,B;return[n(f,{color:e(o).getColorVal("menuColor"),name:(z=C.meta)!=null&&z.icon?(M=C.meta)==null?void 0:M.icon:e(o).layout.menuDefaultIcon},null,8,["color","name"]),m("span",null,T((v=C.meta)!=null&&v.title?(B=C.meta)==null?void 0:B.title:r.$t("noTitle")),1)]}),_:2},1032,["index","onClick"])),[[x]])],64))),256))]),_:1},8,["default-active"]))]),_:1},512),n(ve)])}}});const So=D(To,[["__scopeId","data-v-804bf2b8"]]),Bo={class:"layouts-menu-horizontal-double"},$o=A({__name:"double",setup(y){X(r=>({"40e5df13":e(o).getColorVal("menuBackground"),"4a0b130c":e(o).getColorVal("menuColor"),"3f0137a6":e(o).getColorVal("menuActiveColor"),"6af08ab9":e(o).getColorVal("menuActiveBackground")}));const t=ae(),o=W(),c=U(),u=te(),d=j({menuKey:me(),defaultActive:""}),b=Q(()=>(d.menuKey=me(),c.state.tabsViewRoutes)),g=r=>{$e(r.path,c.state.tabsViewRoutes)&&(d.defaultActive=r.path)},w=()=>{ee(()=>{var p;let r=document.querySelector(".el-menu.menu-horizontal li.is-active");if(!r)return!1;(p=t.value)==null||p.setScrollTop(r.offsetTop)})};return Y(()=>{g(u),w()}),ce(r=>{g(r)}),(r,p)=>{const f=_("Icon"),l=_("el-sub-menu"),s=_("el-menu-item"),F=_("el-menu"),E=_("el-scrollbar"),x=Te("blur");return i(),$("div",Bo,[n(E,{ref_key:"horizontalMenusRef",ref:t,class:"double-menus-scrollbar"},{default:a(()=>[(i(),k(F,{class:"menu-horizontal",mode:"horizontal","default-active":d.defaultActive,key:d.menuKey},{default:a(()=>[(i(!0),$(L,null,J(e(b),C=>(i(),$(L,null,[C.children&&C.children.length>0?(i(),k(l,{index:C.path,key:C.path},{title:a(()=>{var z,M,v,B;return[n(f,{color:e(o).getColorVal("menuColor"),name:(z=C.meta)!=null&&z.icon?(M=C.meta)==null?void 0:M.icon:e(o).layout.menuDefaultIcon},null,8,["color","name"]),m("span",null,T((v=C.meta)!=null&&v.title?(B=C.meta)==null?void 0:B.title:r.$t("noTitle")),1)]}),default:a(()=>[n(pe,{menus:C.children},null,8,["menus"])]),_:2},1032,["index"])):K((i(),k(s,{index:C.path,key:C.path,onClick:z=>e(Be)(C)},{default:a(()=>{var z,M,v,B;return[n(f,{color:e(o).getColorVal("menuColor"),name:(z=C.meta)!=null&&z.icon?(M=C.meta)==null?void 0:M.icon:e(o).layout.menuDefaultIcon},null,8,["color","name"]),m("span",null,T((v=C.meta)!=null&&v.title?(B=C.meta)==null?void 0:B.title:r.$t("noTitle")),1)]}),_:2},1032,["index","onClick"])),[[x]])],64))),256))]),_:1},8,["default-active"]))]),_:1},512),n(ve)])}}});const Vo=D($o,[["__scopeId","data-v-0ed7d3d4"]]),Mo=A({name:"layout/header",components:{DefaultNavBar:go,ClassicNavBar:ko,StreamlineNavBar:So,DoubleNavBar:Vo}}),Io=A({...Mo,setup(y){const t=W(),o=U();return(c,u)=>{const d=_("el-header");return e(o).state.tabFullScreen?R("",!0):(i(),k(d,{key:0,class:"layout-header"},{default:a(()=>[(i(),k(Se(e(t).layout.layoutMode+"NavBar")))]),_:1}))}}});const ye=D(Io,[["__scopeId","data-v-854c4aa8"]]),Ao=A({name:"layout/main"}),Ro=A({...Ao,setup(y){const{proxy:t}=je(),o=te(),c=W(),u=U(),d=j({componentKey:o.path,keepAliveComponentNameList:[]}),b=function(g){if(g){if(d.keepAliveComponentNameList.find(r=>r===g))return;d.keepAliveComponentNameList.push(g)}};return He(()=>{t.eventBus.on("onTabViewRefresh",g=>{d.keepAliveComponentNameList=d.keepAliveComponentNameList.filter(w=>g.meta.keepalive!==w),d.componentKey="",ee(()=>{d.componentKey=g.path,b(g.meta.keepalive)})}),t.eventBus.on("onTabViewClose",g=>{d.keepAliveComponentNameList=d.keepAliveComponentNameList.filter(w=>g.meta.keepalive!==w)})}),rt(()=>{t.eventBus.off("onTabViewRefresh"),t.eventBus.off("onTabViewClose")}),Y(()=>{var g,w;typeof((g=u.state.activeRoute)==null?void 0:g.meta.keepalive)=="string"&&b((w=u.state.activeRoute)==null?void 0:w.meta.keepalive)}),Ue(()=>o.path,()=>{var g,w;d.componentKey=o.path,typeof((g=u.state.activeRoute)==null?void 0:g.meta.keepalive)=="string"&&b((w=u.state.activeRoute)==null?void 0:w.meta.keepalive)}),(g,w)=>{const r=_("router-view"),p=_("el-scrollbar"),f=_("el-main");return i(),k(f,{class:"layout-main"},{default:a(()=>[n(p,{class:"layout-main-scrollbar",style:le(e(bt)()),ref:"mainScrollbarRef"},{default:a(()=>[n(r,null,{default:a(({Component:l})=>[n(we,{name:e(c).layout.mainAnimation,mode:"out-in"},{default:a(()=>[(i(),k(ct,{include:d.keepAliveComponentNameList},[(i(),k(Se(l),{key:d.componentKey}))],1032,["include"]))]),_:2},1032,["name"])]),_:1})]),_:1},8,["style"])]),_:1})}}});const ge=D(Ro,[["__scopeId","data-v-1af00f4e"]]),Fo=y=>(qe("data-v-0aa634f1"),y=y(),We(),y),zo=["title","onMouseover","onMouseout"],Lo=["onClick"],Do=Fo(()=>m("div",{class:"close-full-screen-on"},null,-1)),Eo=A({__name:"closeFullScreen",setup(y){const t=U(),o=j({closeBoxTop:20});Y(()=>{setTimeout(()=>{o.closeBoxTop=-30},300)});const c=()=>{o.closeBoxTop=20},u=()=>{o.closeBoxTop=-30},d=()=>{t.setFullScreen(!1)};return(b,g)=>{const w=_("Icon");return i(),$("div",{title:b.$t("layouts.Exit full screen"),onMouseover:se(c,["stop"]),onMouseout:se(u,["stop"])},[m("div",{onClick:se(d,["stop"]),class:"close-full-screen",style:le({top:o.closeBoxTop+"px"})},[n(w,{name:"el-icon-Close"})],12,Lo),Do],40,zo)}}});const be=D(Eo,[["__scopeId","data-v-0aa634f1"]]),No=A({__name:"default",setup(y){const t=U();return(o,c)=>{const u=_("el-container");return i(),$(L,null,[n(u,{class:"layout-container"},{default:a(()=>[n(Ve),n(u,{class:"content-wrapper"},{default:a(()=>[n(ye),n(ge)]),_:1})]),_:1}),e(t).state.tabFullScreen?(i(),k(be,{key:0})):R("",!0)],64)}}});const Po=D(No,[["__scopeId","data-v-59d252c1"]]),qo=A({__name:"classic",setup(y){const t=U();return(o,c)=>{const u=_("el-container");return i(),$(L,null,[n(u,{class:"layout-container"},{default:a(()=>[n(Ve),n(u,{class:"content-wrapper"},{default:a(()=>[n(ye),n(ge)]),_:1})]),_:1}),e(t).state.tabFullScreen?(i(),k(be,{key:0})):R("",!0)],64)}}});const Wo=D(qo,[["__scopeId","data-v-fb349671"]]),Uo=A({__name:"streamline",setup(y){const t=U();return(o,c)=>{const u=_("el-container");return i(),$(L,null,[n(u,{class:"layout-container"},{default:a(()=>[n(u,{class:"content-wrapper"},{default:a(()=>[n(ye),n(ge)]),_:1})]),_:1}),e(t).state.tabFullScreen?(i(),k(be,{key:0})):R("",!0)],64)}}});const Ho=D(Uo,[["__scopeId","data-v-fcdc1bd3"]]),Oo=A({__name:"double",setup(y){const t=U();return(o,c)=>{const u=_("el-container");return i(),$(L,null,[n(u,{class:"layout-container"},{default:a(()=>[n(Ve),n(u,{class:"content-wrapper"},{default:a(()=>[n(ye),n(ge)]),_:1})]),_:1}),e(t).state.tabFullScreen?(i(),k(be,{key:0})):R("",!0)],64)}}});const Ko=D(Oo,[["__scopeId","data-v-d08319bd"]]),jo={components:{Default:Po,Classic:Wo,Streamline:Ho,Double:Ko}},an=A({...jo,__name:"index",setup(y){const t=xe(),o=U(),c=W(),u=te(),d=Le(),b=De();Y(()=>{if(!b.token)return Ee.push({name:"adminLogin"});g(),r(),Ce(window,"resize",r)}),He(()=>{w(),Ce(window,"resize",w)});const g=()=>{gt().then(p=>{if(d.dataFill(p.data.siteConfig),t.changePort(p.data.terminal.installServicePort),t.changePackageManager(p.data.terminal.npmPackageManager),b.dataFill(p.data.adminInfo),p.data.menus){if(pt(p.data.menus),u.params.to){const l=JSON.parse(u.params.to);if(l.path!=ot.path){let s=ut(l.query)?{}:l.query;_e({path:l.path,query:s});return}}let f=Oe(o.state.tabsViewRoutes);f&&_e(f.path)}})},w=()=>{let p={layoutMode:c.layout.layoutMode,menuCollapse:c.layout.menuCollapse},f=ne.get(re);if(f||ne.set(re,p),document.body.clientWidth<1024)c.setLayout("menuCollapse",!0),c.setLayout("shrink",!0),c.setLayoutMode("Classic");else{let s=f||p;c.setLayout("menuCollapse",s.menuCollapse),c.setLayout("shrink",!1),c.setLayoutMode(s.layoutMode)}},r=()=>{const p=document.querySelector(".nav-tabs");if(!p)return;const f=document.querySelector(".nav-bar"),l=document.querySelector(".nav-menus"),s=f.offsetWidth-(l.offsetWidth+20);p.style.width=s.toString()+"px"};return(p,f)=>(i(),k(Se(e(c).layout.layoutMode)))}});export{an as default};
|