1 |
- import{v as P,u as we,S as ne,B as re,_ as z,x as H,k as ke,C as Ze,D as Qe,E as Ne,F as et,G as tt,L as Q,H as ot,I as Te,J as D,K as Ve,M as nt,N as lt,a as Pe,O as at,P as Ae,Q as Ce,r as qe,R as Re,T as st,b as me}from"./index-EwE51S_X.js";import{d as R,v as j,u as e,K as f,e as i,f as B,C as A,n as le,t as T,y as k,G as q,a2 as fe,B as ae,F as U,L as s,j as n,i as m,Z as rt,a1 as oe,a as Y,r as O,x as ee,o as G,al as ue,D as te,E as ze,am as K,an as Ue,ao as Be,ap as ut,ag as He,ae as se,m as M,p as We,l as Oe,w as Ke,aq as ct,ar as it,as as dt,at as mt,z as Se,au as je,A as pt,av as ft,aw as _t,N as Fe}from"./vue-A59npLRR.js";import{_ as vt,a as gt,i as bt}from"./index-ARIFAkxA.js";import{c as yt,o as Le,g as $e,r as pe,s as ht,a as Ct}from"./router-SYMbkQDJ.js";import{s as xe,m as kt}from"./layout-satO-bbM.js";import{I as xt}from"./index-K8IR974I.js";import{F as ie}from"./index-r6iTpmP6.js";import"./echarts-cxb9vJr1.js";import"./baTable-MdxYOkAk.js";import"./index-XALue448.js";const wt={class:"layout-logo"},Tt={key:0,class:"logo-img",src:vt,alt:"logo"},Bt=R({__name:"logo",setup(_){j(c=>({adf9ae48:e(t).layout.layoutMode!="Streamline"?e(t).getColorVal("menuTopBarBackground"):"transparent"}));const t=P(),o=we(),r=function(){t.layout.shrink&&!t.layout.menuCollapse&&yt(),t.setLayout("menuCollapse",!t.layout.menuCollapse),ne.set(re,{layoutMode:t.layout.layoutMode,menuCollapse:t.layout.menuCollapse}),setTimeout(()=>{xe()},350)};return(c,d)=>{const p=f("Icon");return i(),B("div",wt,[e(t).layout.menuCollapse?A("",!0):(i(),B("img",Tt)),e(t).layout.menuCollapse?A("",!0):(i(),B("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(p,{key:2,onClick:r,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"])):A("",!0)])}}}),Ge=z(Bt,[["__scopeId","data-v-38fd2478"]]),St=R({__name:"menuTree",props:{menus:{default:()=>[]},extends:{default:()=>({level:1})}},setup(_){j(d=>({"5010b154":e(o).getColorVal("menuActiveBackground")}));const{t}=fe(),o=P(),r=_,c=d=>{var p,y;if(((p=r.extends)==null?void 0:p.position)=="horizontal"&&r.extends.level<=1&&((y=d.children)!=null&&y.length)){const h=$e(d.children);h?Le(h):rt({type:"error",message:t("utils.No child menu to jump to!")})}};return(d,p)=>{const y=f("Icon"),h=f("menu-tree",!0),u=f("el-sub-menu"),g=f("el-menu-item");return i(!0),B(U,null,ae(r.menus,v=>(i(),B(U,null,[v.children&&v.children.length>0?(i(),k(u,{onClick:l=>c(v),index:v.path,key:v.path},{title:s(()=>{var l,a,S,F;return[n(y,{color:e(o).getColorVal("menuColor"),name:(l=v.meta)!=null&&l.icon?(a=v.meta)==null?void 0:a.icon:e(o).layout.menuDefaultIcon},null,8,["color","name"]),m("span",null,T((S=v.meta)!=null&&S.title?(F=v.meta)==null?void 0:F.title:d.$t("noTitle")),1)]}),default:s(()=>[n(h,{extends:{...r.extends,level:r.extends.level+1},menus:v.children},null,8,["extends","menus"])]),_:2},1032,["onClick","index"])):(i(),k(g,{index:v.path,key:v.path,onClick:l=>e(Le)(v)},{default:s(()=>{var l,a,S,F;return[n(y,{color:e(o).getColorVal("menuColor"),name:(l=v.meta)!=null&&l.icon?(a=v.meta)==null?void 0:a.icon:e(o).layout.menuDefaultIcon},null,8,["color","name"]),m("span",null,T((S=v.meta)!=null&&S.title?(F=v.meta)==null?void 0:F.title:d.$t("noTitle")),1)]}),_:2},1032,["index","onClick"]))],64))),256)}}}),_e=z(St,[["__scopeId","data-v-99fc3008"]]),$t=R({__name:"menuVertical",setup(_){j(u=>({"7b37a190":p.value,"2dbfe5bf":e(t).getColorVal("menuBackground"),"461a90e0":e(t).getColorVal("menuColor"),"252ff30c":e(t).getColorVal("menuActiveColor")}));const t=P(),o=H(),r=oe(),c=Y(),d=O({defaultActive:""}),p=ee(()=>{let u=0;return t.layout.menuShowTopBar&&(u=50),t.layout.layoutMode=="Default"?"calc(100vh - "+(32+u)+"px)":"calc(100vh - "+u+"px)"}),y=u=>{d.defaultActive=u.path},h=()=>{te(()=>{var g;let u=document.querySelector(".el-menu.layouts-menu-vertical li.is-active");if(!u)return!1;(g=c.value)==null||g.setScrollTop(u.offsetTop)})};return G(()=>{y(r),h()}),ue(u=>{y(u)}),(u,g)=>{const v=f("el-menu"),l=f("el-scrollbar");return i(),k(l,{ref_key:"verticalMenusRef",ref:c,class:"vertical-menus-scrollbar"},{default:s(()=>[n(v,{class:"layouts-menu-vertical","collapse-transition":!1,"unique-opened":e(t).layout.menuUniqueOpened,"default-active":d.defaultActive,collapse:e(t).layout.menuCollapse},{default:s(()=>[n(_e,{menus:e(o).state.tabsViewRoutes},null,8,["menus"])]),_:1},8,["unique-opened","default-active","collapse"])]),_:1},512)}}}),Ie=(_,t)=>{for(let o=0;o<t.length;o++){const r=t[o];if(r.path==_||r.children&&r.children.length>0&&Ie(_,r.children))return r}return!1},It=R({__name:"menuVerticalChildren",setup(_){j(u=>({"691618f7":p.value,"7b87a07e":e(t).getColorVal("menuBackground"),"7fea4a7e":e(t).getColorVal("menuColor"),"5897a39b":e(t).getColorVal("menuActiveColor")}));const t=P(),o=H(),r=oe(),c=Y(),d=O({defaultActive:"",routeChildren:[]}),p=ee(()=>{let u=0;return t.layout.menuShowTopBar&&(u=50),t.layout.layoutMode=="Default"?"calc(100vh - "+(32+u)+"px)":"calc(100vh - "+u+"px)"}),y=u=>{let g=Ie(u.path,o.state.tabsViewRoutes);g?(d.defaultActive=u.path,g.children&&g.children.length>0?d.routeChildren=g.children:d.routeChildren=[g]):d.routeChildren||(d.routeChildren=o.state.tabsViewRoutes)},h=()=>{te(()=>{var g;let u=document.querySelector(".el-menu.layouts-menu-vertical-children li.is-active");if(!u)return!1;(g=c.value)==null||g.setScrollTop(u.offsetTop)})};return G(()=>{y(r),h()}),ue(u=>{y(u)}),(u,g)=>{const v=f("el-menu"),l=f("el-scrollbar");return i(),k(l,{ref_key:"verticalMenusRef",ref:c,class:"children-vertical-menus-scrollbar"},{default:s(()=>[n(v,{class:"layouts-menu-vertical-children","collapse-transition":!1,"unique-opened":e(t).layout.menuUniqueOpened,"default-active":d.defaultActive,collapse:e(t).layout.menuCollapse},{default:s(()=>[d.routeChildren.length>0?(i(),k(_e,{key:0,menus:d.routeChildren},null,8,["menus"])):A("",!0)]),_:1},8,["unique-opened","default-active","collapse"])]),_:1},512)}}}),Mt=R({name:"layout/aside",__name:"aside",setup(_){j(c=>({"12d2a223":r.value}));const t=P(),o=H(),r=ee(()=>t.menuWidth());return(c,d)=>{const p=f("el-aside");return e(o).state.tabFullScreen?A("",!0):(i(),k(p,{key:0,class:q("layout-aside-"+e(t).layout.layoutMode+" "+(e(t).layout.shrink?"shrink":""))},{default:s(()=>[e(t).layout.menuShowTopBar?(i(),k(Ge,{key:0})):A("",!0),e(t).layout.layoutMode=="Double"?(i(),k(It,{key:1})):(i(),k($t,{key:2}))]),_:1},8,["class"]))}}}),Me=z(Mt,[["__scopeId","data-v-be977e32"]]);function Xe(){if(!ze())throw new Error("useCurrentInstance() can only be used inside setup() or functional components!");const{appContext:_}=ze();return{proxy:_.config.globalProperties}}const Vt={class:"el-dropdown-menu"},At=["onClick"],Rt=R({__name:"index",props:{width:{default:150},items:{default:()=>[]}},emits:["contextmenuItemClick"],setup(_,{expose:t,emit:o}){const r=_,c=o,d=O({show:!1,axis:{x:0,y:0},menu:void 0,arrowAxis:10}),p=(u,g)=>{d.menu=u,d.axis=g,d.show=!0},y=u=>{u.disabled||(u.menu=ut(d.menu),c("contextmenuItemClick",u))},h=()=>{d.show=!1};return t({onShowContextmenu:p,onHideContextmenu:h}),G(()=>{ke(document,"click",h)}),(u,g)=>{const v=f("Icon");return i(),k(Be,{name:"el-zoom-in-center"},{default:s(()=>[K((i(),B("div",{class:"el-popper is-pure is-light el-dropdown__popper ba-contextmenu",style:le(`top: ${d.axis.y+5}px;left: ${d.axis.x-14}px;width:${r.width}px`),key:Math.random(),"aria-hidden":"false","data-popper-placement":"bottom"},[m("ul",Vt,[(i(!0),B(U,null,ae(r.items,(l,a)=>(i(),B("li",{key:a,class:q(["el-dropdown-menu__item",l.disabled?"is-disabled":""]),tabindex:"-1",onClick:S=>y(l)},[n(v,{size:"12",name:l.icon},null,8,["name"]),m("span",null,T(l.label),1)],10,At))),128))]),m("span",{class:"el-popper__arrow",style:le({left:`${d.arrowAxis}px`})},null,4)],4)),[[Ue,d.show]])]),_:1})}}}),zt=z(Rt,[["__scopeId","data-v-dd4efaa3"]]),Ft=["onClick","onContextmenu"],Lt=R({__name:"tabs",setup(_){j(C=>({d6997322:e(r).getColorVal("headerBarTabColor"),"3e8014c9":e(r).getColorVal("headerBarTabActiveColor"),"2dcc8058":e(r).layout.layoutMode=="Default"?"none":e(r).getColorVal("headerBarBackground")}));const t=oe(),o=He(),r=P(),c=H(),{proxy:d}=Xe(),p=Y(),y=Ze(),h=Y(),u=O({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"}]}),g=O({width:"0",transform:"translateX(0px)"}),v=C=>{o.push(C)},l=(C,$)=>{u.contextmenuItems[0].disabled=t.path!==C.path,u.contextmenuItems[4].disabled=u.contextmenuItems[3].disabled=c.state.tabsView.length==1;const{clientX:V,clientY:I}=$;h.value.onShowContextmenu(C,{x:V,y:I})},a=function(C){if(!C)return!1;g.width=C.clientWidth+"px",g.transform=`translateX(${C.offsetLeft}px)`;let $=C.offsetLeft+C.clientWidth-p.value.clientWidth;C.offsetLeft<p.value.scrollLeft?p.value.scrollTo(C.offsetLeft,0):$>p.value.scrollLeft&&p.value.scrollTo($,0)},S=()=>{const C=c.state.tabsView.slice(-1)[0];C?o.push(C):o.push(Ne)},F=C=>{var $;c.closeTab(C),d.eventBus.emit("onTabViewClose",C),(($=c.state.activeRoute)==null?void 0:$.path)===C.path?S():(c.setActiveRoute(c.state.activeRoute),te(()=>{a(y.value[c.state.activeIndex])})),h.value.onHideContextmenu()},x=C=>{var $;c.closeTabs(C),c.setActiveRoute(C),(($=c.state.activeRoute)==null?void 0:$.path)!==t.path&&o.push(C.path)},E=C=>{var V;let $=$e(c.state.tabsViewRoutes);if($&&$.path==C.path)return x(C);if($&&$.path==((V=c.state.activeRoute)==null?void 0:V.path))return x(c.state.activeRoute);c.closeTabs(!1),$&&pe($.path)},J=async C=>{const{name:$,menu:V}=C;if(V)switch($){case"refresh":d.eventBus.emit("onTabViewRefresh",V);break;case"close":F(V);break;case"closeOther":x(V);break;case"closeAll":E(V);break;case"fullScreen":t.path!==(V==null?void 0:V.path)&&o.push(V==null?void 0:V.path),c.setFullScreen(!0);break}},L=function(C){c.addTab(C),c.setActiveRoute(C),te(()=>{a(y.value[c.state.activeIndex])})};return ue(async C=>{L(C)}),G(()=>{L(o.currentRoute.value),new Qe(p.value)}),(C,$)=>{const V=f("Icon");return i(),B(U,null,[m("div",{class:"nav-tabs",ref_key:"tabScrollbarRef",ref:p},[(i(!0),B(U,null,ae(e(c).state.tabsView,(I,Z)=>(i(),B("div",{onClick:N=>v(I),onContextmenu:se(N=>l(I,N),["prevent"]),class:q(["ba-nav-tab",e(c).state.activeIndex==Z?"active":""]),ref_for:!0,ref:e(y).set,key:Z},[M(T(I.meta.title)+" ",1),n(Be,{onAfterLeave:$[0]||($[0]=N=>a(e(y)[e(c).state.activeIndex])),name:"el-fade-in"},{default:s(()=>[K(n(V,{class:"close-icon",onClick:se(N=>F(I),["stop"]),size:"15",name:"el-icon-Close"},null,8,["onClick"]),[[Ue,e(c).state.tabsView.length>1]])]),_:2},1024)],42,Ft))),128)),m("div",{style:le(g),class:"nav-tabs-active-box"},null,4)],512),n(zt,{ref_key:"contextmenuRef",ref:h,items:u.contextmenuItems,onContextmenuItemClick:J},null,8,["items"])],64)}}}),Je=z(Lt,[["__scopeId","data-v-5d6f32a7"]]),De=[["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"]],X=(()=>{if(typeof document>"u")return!1;const _=De[0],t={};for(const o of De)if((o==null?void 0:o[1])in document){for(const[c,d]of o.entries())t[_[c]]=d;return t}return!1})(),Ee={change:X.fullscreenchange,error:X.fullscreenerror};let W={request(_=document.documentElement,t){return new Promise((o,r)=>{const c=()=>{W.off("change",c),o()};W.on("change",c);const d=_[X.requestFullscreen](t);d instanceof Promise&&d.then(c).catch(r)})},exit(){return new Promise((_,t)=>{if(!W.isFullscreen){_();return}const o=()=>{W.off("change",o),_()};W.on("change",o);const r=document[X.exitFullscreen]();r instanceof Promise&&r.then(o).catch(t)})},toggle(_,t){return W.isFullscreen?W.exit():W.request(_,t)},onchange(_){W.on("change",_)},onerror(_){W.on("error",_)},on(_,t){const o=Ee[_];o&&document.addEventListener(o,t,!1)},off(_,t){const o=Ee[_];o&&document.removeEventListener(o,t,!1)},raw:X};Object.defineProperties(W,{isFullscreen:{get:()=>!!document[X.fullscreenElement]},element:{enumerable:!0,get:()=>document[X.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[X.fullscreenEnabled]}});X||(W={isEnabled:!1});const de=W,Dt={},Et={class:"theme-toggle-content"},Nt={class:"switch"},Pt={class:"switch-action"};function qt(_,t){const o=f("Icon");return i(),B("div",Et,[m("div",Nt,[m("div",Pt,[n(o,{name:"local-dark",color:"#f2f2f2",size:"13px",class:"switch-icon dark-icon"}),n(o,{name:"local-light",color:"#303133",size:"13px",class:"switch-icon light-icon"})])])])}const Ut=z(Dt,[["render",qt],["__scopeId","data-v-62d134a8"]]),Ht=et({onChanged(_){const t=P();Ot(_),t.setLayout("isDark",_),t.onSetLayoutColor()}}),Wt=tt(Ht);function Ot(_){const t=document.getElementsByTagName("html")[0];_?t.setAttribute("class","dark"):t.setAttribute("class","")}const Kt=Wt,ve=_=>(We("data-v-06c3bb38"),_=_(),Oe(),_),jt={class:"layout-config-drawer"},Gt={class:"layout-mode-styles-box"},Xt={class:"layout-mode-box-style"},Jt=ve(()=>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)),Yt={class:"layout-mode-style-name"},Zt=ve(()=>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)),Qt={class:"layout-mode-style-name"},eo=ve(()=>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)),to={class:"layout-mode-style-name"},oo=ve(()=>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)),no={class:"layout-mode-style-name"},lo={class:"layout-config-global"},ao={class:"layout-config-aside"},so={class:"layout-config-aside"},ro={class:"ba-center"},uo=R({__name:"config",setup(_){const{t}=fe(),o=P(),r=H(),c=He(),d=(v,l)=>{o.setLayout(l,v)},p=(v,l)=>{if(v===null)return;const a=o.layout[l];o.layout.isDark?a[1]=v:a[0]=v,o.setLayout(l,a)},y=v=>{ne.set(re,{layoutMode:v,menuCollapse:o.layout.menuCollapse}),o.setLayoutMode(v)},h=(v,l)=>{o.setLayout(l,v);const a=r.state.tabsViewRoutes;r.setTabsViewRoutes([]),setTimeout(()=>{r.setTabsViewRoutes(a)},200)},u=()=>{o.setLayout("showDrawer",!1)},g=()=>{Q.remove(ot),ne.remove(re),c.go(0)};return(v,l)=>{const a=f("el-divider"),S=f("el-col"),F=f("el-row"),x=f("el-form-item"),E=f("el-option"),J=f("el-select"),L=f("el-color-picker"),C=f("el-switch"),$=f("el-input"),V=f("el-button"),I=f("el-popconfirm"),Z=f("el-form"),N=f("el-scrollbar"),b=f("el-drawer");return i(),B("div",jt,[n(b,{"model-value":e(o).layout.showDrawer,title:e(t)("layouts.Layout configuration"),size:"310px",onClose:u},{default:s(()=>[n(N,{class:"layout-mode-style-scrollbar"},{default:s(()=>[n(Z,{ref:"formRef",model:e(o).layout},{default:s(()=>[m("div",Gt,[n(a,{"border-style":"dashed"},{default:s(()=>[M(T(e(t)("layouts.Layout mode")),1)]),_:1}),m("div",Xt,[n(F,{class:"layout-mode-box-style-row",gutter:10},{default:s(()=>[n(S,{span:12},{default:s(()=>[m("div",{onClick:l[0]||(l[0]=w=>y("Default")),class:q(["layout-mode-style default",e(o).layout.layoutMode=="Default"?"active":""])},[Jt,m("div",Yt,T(e(t)("layouts.default")),1)],2)]),_:1}),n(S,{span:12},{default:s(()=>[m("div",{onClick:l[1]||(l[1]=w=>y("Classic")),class:q(["layout-mode-style classic",e(o).layout.layoutMode=="Classic"?"active":""])},[Zt,m("div",Qt,T(e(t)("layouts.classic")),1)],2)]),_:1})]),_:1}),n(F,{gutter:10},{default:s(()=>[n(S,{span:12},{default:s(()=>[m("div",{onClick:l[2]||(l[2]=w=>y("Streamline")),class:q(["layout-mode-style streamline",e(o).layout.layoutMode=="Streamline"?"active":""])},[eo,m("div",to,T(e(t)("layouts.Single column")),1)],2)]),_:1}),n(S,{span:12},{default:s(()=>[m("div",{onClick:l[3]||(l[3]=w=>y("Double")),class:q(["layout-mode-style double",e(o).layout.layoutMode=="Double"?"active":""])},[oo,m("div",no,T(e(t)("layouts.Double column")),1)],2)]),_:1})]),_:1})]),n(a,{"border-style":"dashed"},{default:s(()=>[M(T(e(t)("layouts.overall situation")),1)]),_:1}),m("div",lo,[n(x,{size:"large",label:e(t)("layouts.Dark mode")},{default:s(()=>[n(Ut,{onClick:l[4]||(l[4]=w=>e(Kt)())})]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Background page switching animation")},{default:s(()=>[n(J,{onChange:l[5]||(l[5]=w=>d(w,"mainAnimation")),"model-value":e(o).layout.mainAnimation,placeholder:e(t)("layouts.Please select an animation name")},{default:s(()=>[n(E,{label:"slide-right",value:"slide-right"}),n(E,{label:"slide-left",value:"slide-left"}),n(E,{label:"el-fade-in-linear",value:"el-fade-in-linear"}),n(E,{label:"el-fade-in",value:"el-fade-in"}),n(E,{label:"el-zoom-in-center",value:"el-zoom-in-center"}),n(E,{label:"el-zoom-in-top",value:"el-zoom-in-top"}),n(E,{label:"el-zoom-in-bottom",value:"el-zoom-in-bottom"})]),_:1},8,["model-value","placeholder"])]),_:1},8,["label"])]),n(a,{"border-style":"dashed"},{default:s(()=>[M(T(e(t)("layouts.sidebar")),1)]),_:1}),m("div",ao,[n(x,{label:e(t)("layouts.Side menu bar background color")},{default:s(()=>[n(L,{onChange:l[6]||(l[6]=w=>p(w,"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:s(()=>[n(L,{onChange:l[7]||(l[7]=w=>p(w,"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:s(()=>[n(L,{onChange:l[8]||(l[8]=w=>p(w,"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:s(()=>[n(L,{onChange:l[9]||(l[9]=w=>p(w,"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:s(()=>[n(C,{onChange:l[10]||(l[10]=w=>d(w,"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:s(()=>[n(L,{onChange:l[11]||(l[11]=w=>p(w,"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:s(()=>[n($,{onInput:l[12]||(l[12]=w=>d(w,"menuWidth")),type:"number",step:10,"model-value":e(o).layout.menuWidth},{append:s(()=>[M("px")]),_:1},8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Side menu default icon")},{default:s(()=>[n(xt,{onChange:l[13]||(l[13]=w=>h(w,"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:s(()=>[n(C,{onChange:l[14]||(l[14]=w=>d(w,"menuCollapse")),"model-value":e(o).layout.menuCollapse},null,8,["model-value"])]),_:1},8,["label"]),n(x,{label:e(t)("layouts.Side menu accordion")},{default:s(()=>[n(C,{onChange:l[15]||(l[15]=w=>d(w,"menuUniqueOpened")),"model-value":e(o).layout.menuUniqueOpened},null,8,["model-value"])]),_:1},8,["label"])]),n(a,{"border-style":"dashed"},{default:s(()=>[M(T(e(t)("layouts.Top bar")),1)]),_:1}),m("div",so,[n(x,{label:e(t)("layouts.Top bar background color")},{default:s(()=>[n(L,{onChange:l[16]||(l[16]=w=>p(w,"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:s(()=>[n(L,{onChange:l[17]||(l[17]=w=>p(w,"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:s(()=>[n(L,{onChange:l[18]||(l[18]=w=>p(w,"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:s(()=>[n(L,{onChange:l[19]||(l[19]=w=>p(w,"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:s(()=>[n(L,{onChange:l[20]||(l[20]=w=>p(w,"headerBarTabActiveColor")),"model-value":e(o).getColorVal("headerBarTabActiveColor")},null,8,["model-value"])]),_:1},8,["label"])]),n(I,{onConfirm:g,title:e(t)("layouts.Are you sure you want to restore all configurations to the default values?")},{reference:s(()=>[m("div",ro,[n(V,{class:"w80",type:"info"},{default:s(()=>[M(T(e(t)("layouts.Restore default")),1)]),_:1})])]),_:1},8,["title"])])]),_:1},8,["model"])]),_:1})]),_:1},8,["model-value","title"])])}}}),co=z(uo,[["__scopeId","data-v-06c3bb38"]]),io={class:"command"},mo={class:"task-opt"},po=["onClick"],fo={class:"indent-2"},_o={class:"package-manager-dialog-footer"},vo={class:"config-buttons"},go=R({__name:"index",setup(_){const{t}=fe(),o=Te(),r=O({terminalWarning:"",port:o.state.port,menuExpand:document.documentElement.clientWidth>1840}),c=ee(()=>{let l=o.state.port==""?"80":o.state.port;return l=="8000"?"php think run":"php think run -p "+l}),d=ee(()=>{let l=o.state.port==""?"":":"+o.state.port;return"http://localhost"+l+" "+t("terminal.or")+" http://"+t("terminal.Site domain name")+l}),p=l=>{Ve({port:l}).then(a=>{a.code==1?(o.changePort(l),v()):r.port=o.state.port}).catch(()=>{r.port=o.state.port})},y=l=>{let a=t("terminal.unknown"),S="info";switch(l){case D.Waiting:a=t("terminal.Waiting for execution"),S="info";break;case D.Connecting:a=t("terminal.Connecting"),S="warning";break;case D.Executing:a=t("terminal.Executing"),S="warning";break;case D.Success:a=t("terminal.Successful execution"),S="success";break;case D.Failed:a=t("terminal.Execution failed"),S="danger";break;case D.Unknown:a=t("terminal.Unknown execution result"),S="danger";break}return{statusText:a,statusType:S}},h=()=>{dt.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")})},u=l=>{Ve({manager:l}).then(a=>{a.code==1&&o.changePackageManager(l)}),o.togglePackageManagerDialog(!1)},g=l=>{r.terminalWarning=l},v=()=>{nt()!=o.state.port?g(t("terminal.The current terminal is not running under the installation service, and some commands may not be executed")):g("")};return Ke(()=>o.state.port,l=>{l!=r.port&&(r.port=l,v())}),G(()=>{v()}),(l,a)=>{const S=f("el-alert"),F=f("el-tag"),x=f("el-button"),E=f("Icon"),J=f("el-card"),L=f("el-timeline-item"),C=f("el-timeline"),$=f("el-empty"),V=f("el-button-group"),I=f("el-dialog"),Z=f("el-form"),N=ct("blur");return i(),B(U,null,[n(I,it(l.$attrs,{modelValue:e(o).state.show,"onUpdate:modelValue":a[7]||(a[7]=b=>e(o).state.show=b),title:e(t)("terminal.Terminal"),class:"ba-terminal-dialog","append-to-body":!0}),{default:s(()=>[r.terminalWarning?(i(),k(S,{key:0,class:"terminal-warning-alert",title:r.terminalWarning,type:"error"},null,8,["title"])):A("",!0),e(o).state.taskList.length?(i(),k(C,{key:1},{default:s(()=>[(i(!0),B(U,null,ae(e(o).state.taskList,(b,w)=>(i(),k(L,{key:w,class:q(["task-item","task-status-"+b.status]),type:y(b.status).statusType,center:"",timestamp:b.createTime,placement:"top"},{default:s(()=>[n(J,null,{default:s(()=>[m("div",null,[n(F,{type:y(b.status).statusType},{default:s(()=>[M(T(y(b.status).statusText),1)]),_:2},1032,["type"]),(b.status==e(D).Failed||b.status==e(D).Unknown)&&b.blockOnFailure?(i(),k(F,{key:0,class:"block-on-failure-tag",type:"warning"},{default:s(()=>[M(T(e(t)("terminal.Failure to execute this command will block the execution of the queue")),1)]),_:1})):A("",!0),b.status==e(D).Executing||b.status==e(D).Connecting?(i(),k(F,{key:1,class:"block-on-failure-tag",type:"danger"},{default:s(()=>[M(T(e(t)("terminal.Do not refresh the browser")),1)]),_:1})):A("",!0),m("span",io,T(b.command),1),m("div",mo,[b.status==e(D).Failed||b.status==e(D).Unknown?K((i(),k(x,{key:0,title:e(t)("Retry"),size:"small",type:"warning",icon:"el-icon-RefreshRight",circle:"",onClick:ce=>e(o).retryTask(w)},null,8,["title","onClick"])),[[N]]):A("",!0),K(n(x,{onClick:ce=>e(o).delTask(w),title:e(t)("Delete"),size:"small",type:"danger",icon:"el-icon-Delete",circle:""},null,8,["onClick","title"]),[[N]])])]),b.status!=e(D).Waiting?(i(),B(U,{key:0},[b.status!=e(D).Connecting&&b.status!=e(D).Executing?(i(),B("div",{key:0,onClick:ce=>e(o).setTaskShowMessage(w),class:"toggle-message-display"},[m("span",null,T(e(t)("terminal.Command run log")),1),n(E,{name:b.showMessage?"el-icon-ArrowUp":"el-icon-ArrowDown",size:"16",color:"#909399"},null,8,["name"])],8,po)):A("",!0),b.status==e(D).Connecting||b.status==e(D).Executing||b.status>e(D).Executing&&b.showMessage?(i(),B("div",{key:1,class:q(["exec-message","exec-message-"+b.uuid])},[(i(!0),B(U,null,ae(b.message,(ce,Ye)=>(i(),B("pre",{key:Ye,class:"message-item"},T(ce),1))),128))],2)):A("",!0)],64)):A("",!0)]),_:2},1024)]),_:2},1032,["class","type","timestamp"]))),128))]),_:1})):(i(),k($,{key:2,"image-size":80,description:e(t)("terminal.No mission yet")},null,8,["description"])),n(V,null,{default:s(()=>[K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-MagicStick",onClick:a[0]||(a[0]=b=>e(o).addTaskPM("test",!1))},{default:s(()=>[M(T(e(t)("terminal.Test command")),1)]),_:1})),[[N]]),K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-Download",onClick:a[1]||(a[1]=b=>e(o).addTaskPM("web-install"))},{default:s(()=>[M(T(e(t)("terminal.Install dependent packages")),1)]),_:1})),[[N]]),K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-Sell",onClick:a[2]||(a[2]=b=>h())},{default:s(()=>[M(T(e(t)("terminal.Republish")),1)]),_:1})),[[N]]),r.menuExpand?(i(),B(U,{key:1},[K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-Delete",onClick:a[4]||(a[4]=b=>e(o).clearSuccessTask())},{default:s(()=>[M(T(e(t)("terminal.Clean up task list")),1)]),_:1})),[[N]]),K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-Switch",onClick:a[5]||(a[5]=b=>e(o).togglePackageManagerDialog(!0))},{default:s(()=>[M(T(e(t)("terminal.Package manager"))+" "+T(e(o).state.packageManager.toUpperCase()),1)]),_:1})),[[N]]),K((i(),k(x,{class:"terminal-menu-item",icon:"el-icon-Tools",onClick:a[6]||(a[6]=b=>e(o).toggleConfigDialog())},{default:s(()=>[M(T(e(t)("terminal.Terminal settings")),1)]),_:1})),[[N]])],64)):K((i(),k(x,{key:0,class:"terminal-menu-item",icon:"el-icon-Expand",onClick:a[3]||(a[3]=b=>r.menuExpand=!0)},null,512)),[[N]])]),_:1})]),_:1},16,["modelValue","title"]),n(I,{onClose:a[14]||(a[14]=b=>e(o).togglePackageManagerDialog(!1)),"model-value":e(o).state.showPackageManagerDialog,class:"ba-terminal-dialog",title:e(t)("terminal.Please select package manager"),center:""},{footer:s(()=>[m("div",_o,[n(x,{onClick:a[8]||(a[8]=b=>u("npm"))},{default:s(()=>[M("npm")]),_:1}),n(x,{onClick:a[9]||(a[9]=b=>u("cnpm"))},{default:s(()=>[M("cnpm")]),_:1}),n(x,{onClick:a[10]||(a[10]=b=>u("pnpm"))},{default:s(()=>[M("pnpm")]),_:1}),n(x,{onClick:a[11]||(a[11]=b=>u("yarn"))},{default:s(()=>[M("yarn")]),_:1}),n(x,{onClick:a[12]||(a[12]=b=>u("ni"))},{default:s(()=>[M("ni")]),_:1}),n(x,{onClick:a[13]||(a[13]=b=>u("none"))},{default:s(()=>[M(T(e(t)("terminal.I want to execute the command manually")),1)]),_:1})])]),default:s(()=>[m("div",fo,T(e(t)("terminal.Switch package manager title")),1)]),_:1},8,["model-value","title"]),n(I,{onClose:a[19]||(a[19]=b=>e(o).toggleConfigDialog(!1)),"model-value":e(o).state.showConfig,class:"ba-terminal-dialog",title:e(t)("terminal.Terminal settings")},{default:s(()=>[n(Z,{"label-position":"top"},{default:s(()=>[n(ie,{label:e(t)("terminal.Install service port"),modelValue:r.port,"onUpdate:modelValue":a[15]||(a[15]=b=>r.port=b),type:"number","input-attr":{onChange:p},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:c.value,"onUpdate:modelValue":a[16]||(a[16]=b=>c.value=b),type:"string","input-attr":{disabled:!0},attr:{blockHelp: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:d.value,"onUpdate:modelValue":a[17]||(a[17]=b=>d.value=b),type:"string","input-attr":{disabled:!0},attr:{blockHelp: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",vo,[n(x,{onClick:a[18]||(a[18]=b=>e(o).toggleConfigDialog(!1))},{default:s(()=>[M(T(e(t)("terminal.Back to terminal")),1)]),_:1})])]),_:1},8,["model-value","title"])],64)}}}),bo=z(go,[["__scopeId","data-v-a2a22db1"]]),yo={class:"nav-menu-item"},ho={class:"nav-menu-item"},Co=["src"],ko={class:"admin-name"},xo={class:"admin-info-base"},wo=["src"],To={class:"admin-info-other"},Bo={class:"admin-info-name"},So={class:"admin-info-lasttime"},$o={class:"admin-info-footer"},Io=R({__name:"navMenus",setup(_){j(l=>({"419aa911":e(r).getColorVal("headerBarBackground"),"3752f7b1":e(r).getColorVal("headerBarTabColor"),"7388d096":e(r).getColorVal("headerBarHoverBackground")})),Y(0);const{t}=fe();lt().then(l=>{o.Bellvalue=l.data.value});const o=Pe(),r=P(),c=Te(),d=we(),p=O({isFullScreen:!1,currentNavMenu:"",showLayoutDrawer:!1,showAdminInfoPopover:!1}),y=(l,a)=>{p.currentNavMenu=l?a:""},h=()=>{if(!de.isEnabled)return mt.warning(t("layouts.Full screen is not supported")),!1;de.toggle(),de.onchange(()=>{p.isFullScreen=de.isFullscreen})},u=()=>{p.showAdminInfoPopover=!1,pe({name:"routine/adminInfo"})},g=()=>{gt().then(()=>{Q.remove(Ce),qe.go(0)})},v=l=>{if(l=="storage"||l=="all"){const a=Q.get(Ce),S=Q.get(Re);if(ne.clear(),Q.clear(),Q.set(Ce,a),Q.set(Re,S),l=="storage")return}st(l).then(()=>{})};return(l,a)=>{const S=f("Icon"),F=f("router-link"),x=f("el-badge"),E=f("el-dropdown-item"),J=f("el-dropdown-menu"),L=f("el-dropdown"),C=f("el-avatar"),$=f("el-button"),V=f("el-popover");return i(),B("div",{class:q(["nav-menus",e(r).layout.layoutMode])},[n(F,{class:"h100",target:"_blank",title:e(t)("Home"),to:"/"},{default:s(()=>[m("div",yo,[n(S,{color:e(r).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"el-icon-Monitor",size:"18"},null,8,["color"])])]),_:1},8,["title"]),n(F,{class:"h100",target:"_blank",title:e(t)("admin/notification"),to:"/admin/notification/index"},{default:s(()=>[m("div",ho,[n(x,{value:e(o).Bellvalue,class:"item"},{default:s(()=>[n(S,{color:e(r).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"el-icon-Bell",size:"18"},null,8,["color"])]),_:1},8,["value"])])]),_:1},8,["title"]),n(L,{onVisibleChange:a[0]||(a[0]=I=>y(I,"lang")),class:"h100",size:"large","hide-timeout":50,placement:"bottom",trigger:"click","hide-on-click":!0},{dropdown:s(()=>[n(J,{class:"dropdown-menu-box"},{default:s(()=>[(i(!0),B(U,null,ae(e(r).lang.langArray,I=>(i(),k(E,{key:I.name,onClick:Z=>e(at)(I.name)},{default:s(()=>[M(T(I.value),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),default:s(()=>[m("div",{class:q(["nav-menu-item pt2",p.currentNavMenu=="lang"?"hover":""])},[n(S,{color:e(r).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"local-lang",size:"18"},null,8,["color"])],2)]),_:1}),m("div",{onClick:h,class:q(["nav-menu-item",p.isFullScreen?"hover":""])},[p.isFullScreen?(i(),k(S,{key:0,color:e(r).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"local-full-screen-cancel",size:"18"},null,8,["color"])):(i(),k(S,{key:1,color:e(r).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"el-icon-FullScreen",size:"18"},null,8,["color"]))],2),e(o).super?(i(),B("div",{key:0,onClick:a[1]||(a[1]=I=>e(c).toggle()),class:"nav-menu-item pt2"},[n(x,{"is-dot":e(c).state.showDot},{default:s(()=>[n(S,{color:e(r).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"local-terminal",size:"26"},null,8,["color"])]),_:1},8,["is-dot"])])):A("",!0),e(o).super?(i(),k(L,{key:1,onVisibleChange:a[5]||(a[5]=I=>y(I,"clear")),class:"h100",size:"large","hide-timeout":50,placement:"bottom",trigger:"click","hide-on-click":!0},{dropdown:s(()=>[n(J,{class:"dropdown-menu-box"},{default:s(()=>[n(E,{onClick:a[2]||(a[2]=I=>v("tp"))},{default:s(()=>[M(T(e(t)("utils.Clean up system cache")),1)]),_:1}),n(E,{onClick:a[3]||(a[3]=I=>v("storage"))},{default:s(()=>[M(T(e(t)("utils.Clean up browser cache")),1)]),_:1}),n(E,{onClick:a[4]||(a[4]=I=>v("all")),divided:""},{default:s(()=>[M(T(e(t)("utils.Clean up all cache")),1)]),_:1})]),_:1})]),default:s(()=>[m("div",{class:q(["nav-menu-item",p.currentNavMenu=="clear"?"hover":""])},[n(S,{color:e(r).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"el-icon-Delete",size:"18"},null,8,["color"])],2)]),_:1})):A("",!0),e(d).userInitialize?(i(),k(V,{key:2,onShow:a[6]||(a[6]=I=>y(!0,"adminInfo")),onHide:a[7]||(a[7]=I=>y(!1,"adminInfo")),placement:"bottom-end","hide-after":0,width:260,trigger:"click","popper-class":"admin-info-box",visible:p.showAdminInfoPopover,"onUpdate:visible":a[8]||(a[8]=I=>p.showAdminInfoPopover=I)},{reference:s(()=>[m("div",{class:q(["admin-info",p.currentNavMenu=="adminInfo"?"hover":""])},[n(C,{size:25,fit:"fill"},{default:s(()=>[m("img",{src:e(Ae)(e(o).avatar),alt:""},null,8,Co)]),_:1}),m("div",ko,T(e(o).nickname),1)],2)]),default:s(()=>[m("div",null,[m("div",xo,[n(C,{size:70,fit:"fill"},{default:s(()=>[m("img",{src:e(Ae)(e(o).avatar),alt:""},null,8,wo)]),_:1}),m("div",To,[m("div",Bo,T(e(o).nickname),1),m("div",So,T(e(o).last_login_time),1)])]),m("div",$o,[n($,{onClick:u,type:"primary",plain:""},{default:s(()=>[M(T(e(t)("layouts.personal data")),1)]),_:1}),n($,{onClick:g,type:"danger",plain:""},{default:s(()=>[M(T(e(t)("layouts.cancellation")),1)]),_:1})])])]),_:1},8,["visible"])):A("",!0),m("div",{onClick:a[9]||(a[9]=I=>e(r).setLayout("showDrawer",!0)),class:"nav-menu-item"},[n(S,{color:e(r).getColorVal("headerBarTabColor"),class:"nav-menu-icon",name:"fa fa-cogs",size:"18"},null,8,["color"])]),n(co),n(bo)],2)}}}),ge=z(Io,[["__scopeId","data-v-7e3b3e4d"]]),Mo={class:"nav-bar"},Vo=R({__name:"default",setup(_){j(o=>({"341e91f0":e(t).getColorVal("headerBarTabColor"),"7d0afb8a":e(t).getColorVal("headerBarTabActiveColor"),"5eccd556":e(t).getColorVal("headerBarTabActiveBackground")}));const t=P();return(o,r)=>(i(),B("div",Mo,[n(Je),n(ge)]))}}),Ao=z(Vo,[["__scopeId","data-v-8d90b156"]]),Ro={class:"nav-bar"},zo={key:0,class:"unfold"},Fo=R({__name:"classic",setup(_){j(r=>({"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=P(),o=()=>{ht("ba-aside-menu-shade",()=>{t.setLayout("menuCollapse",!0)}),t.setLayout("menuCollapse",!1)};return(r,c)=>{const d=f("Icon");return i(),B("div",Ro,[e(t).layout.shrink&&e(t).layout.menuCollapse?(i(),B("div",zo,[n(d,{onClick:o,name:"fa fa-indent",color:e(t).getColorVal("menuActiveColor"),size:"18"},null,8,["color"])])):A("",!0),e(t).layout.shrink?A("",!0):(i(),k(Je,{key:1})),n(ge)])}}}),Lo=z(Fo,[["__scopeId","data-v-af750839"]]),Do={class:"layouts-menu-horizontal"},Eo={key:0,class:"menu-horizontal-logo"},No=R({__name:"menuHorizontal",setup(_){j(u=>({"2ff67b14":e(o).getColorVal("headerBarHoverBackground"),"4b0e897f":e(o).getColorVal("menuBackground"),"60b6d5c0":e(o).getColorVal("menuColor"),"79eddaba":e(o).getColorVal("menuActiveColor"),"6b92b425":e(o).getColorVal("menuActiveBackground")}));const t=Y(),o=P(),r=H(),c=oe(),d=O({menuKey:me(),defaultActive:""}),p=ee(()=>(d.menuKey=me(),r.state.tabsViewRoutes)),y=u=>{d.defaultActive=u.path},h=()=>{te(()=>{var g;let u=document.querySelector(".el-menu.menu-horizontal li.is-active");if(!u)return!1;(g=t.value)==null||g.setScrollTop(u.offsetTop)})};return G(()=>{y(c),h()}),ue(u=>{y(u)}),(u,g)=>{const v=f("el-menu"),l=f("el-scrollbar");return i(),B("div",Do,[e(o).layout.menuShowTopBar?(i(),B("div",Eo,[n(Ge)])):A("",!0),n(l,{ref_key:"horizontalMenusRef",ref:t,class:"horizontal-menus-scrollbar"},{default:s(()=>[(i(),k(v,{class:"menu-horizontal",mode:"horizontal","default-active":d.defaultActive,key:d.menuKey},{default:s(()=>[n(_e,{extends:{position:"horizontal",level:1},menus:p.value},null,8,["menus"])]),_:1},8,["default-active"]))]),_:1},512),n(ge)])}}}),Po=z(No,[["__scopeId","data-v-21507473"]]),qo={class:"layouts-menu-horizontal-double"},Uo=R({__name:"double",setup(_){j(u=>({"2680abd7":e(o).getColorVal("menuBackground"),"5a674870":e(o).getColorVal("menuColor"),"0cc00362":e(o).getColorVal("menuActiveColor"),"2c87b47d":e(o).getColorVal("menuActiveBackground")}));const t=Y(),o=P(),r=H(),c=oe(),d=O({menuKey:me(),defaultActive:""}),p=ee(()=>(d.menuKey=me(),r.state.tabsViewRoutes)),y=u=>{Ie(u.path,r.state.tabsViewRoutes)&&(d.defaultActive=u.path)},h=()=>{te(()=>{var g;let u=document.querySelector(".el-menu.menu-horizontal li.is-active");if(!u)return!1;(g=t.value)==null||g.setScrollTop(u.offsetTop)})};return G(()=>{y(c),h()}),ue(u=>{y(u)}),(u,g)=>{const v=f("el-menu"),l=f("el-scrollbar");return i(),B("div",qo,[n(l,{ref_key:"horizontalMenusRef",ref:t,class:"double-menus-scrollbar"},{default:s(()=>[(i(),k(v,{class:"menu-horizontal",mode:"horizontal","default-active":d.defaultActive,key:d.menuKey},{default:s(()=>[n(_e,{extends:{position:"horizontal",level:1},menus:p.value},null,8,["menus"])]),_:1},8,["default-active"]))]),_:1},512),n(ge)])}}}),Ho=z(Uo,[["__scopeId","data-v-c669c503"]]),Wo=R({name:"layout/header",components:{DefaultNavBar:Ao,ClassicNavBar:Lo,StreamlineNavBar:Po,DoubleNavBar:Ho},__name:"header",setup(_){const t=P(),o=H();return(r,c)=>{const d=f("el-header");return e(o).state.tabFullScreen?A("",!0):(i(),k(d,{key:0,class:"layout-header"},{default:s(()=>[(i(),k(Se(e(t).layout.layoutMode+"NavBar")))]),_:1}))}}}),be=z(Wo,[["__scopeId","data-v-9014eea9"]]),Oo=R({name:"layout/main",__name:"main",setup(_){const{proxy:t}=Xe(),o=oe(),r=P(),c=H(),d=Y(),p=O({componentKey:o.path,keepAliveComponentNameList:[]}),y=function(h){if(h){if(p.keepAliveComponentNameList.find(g=>g===h))return;p.keepAliveComponentNameList.push(h)}};return je(()=>{t.eventBus.on("onTabViewRefresh",h=>{p.keepAliveComponentNameList=p.keepAliveComponentNameList.filter(u=>h.meta.keepalive!==u),p.componentKey="",te(()=>{p.componentKey=h.path,y(h.meta.keepalive)})}),t.eventBus.on("onTabViewClose",h=>{p.keepAliveComponentNameList=p.keepAliveComponentNameList.filter(u=>h.meta.keepalive!==u)})}),pt(()=>{t.eventBus.off("onTabViewRefresh"),t.eventBus.off("onTabViewClose")}),G(()=>{var h,u;typeof((h=c.state.activeRoute)==null?void 0:h.meta.keepalive)=="string"&&y((u=c.state.activeRoute)==null?void 0:u.meta.keepalive)}),Ke(()=>o.path,()=>{var h,u;p.componentKey=o.path,typeof((h=c.state.activeRoute)==null?void 0:h.meta.keepalive)=="string"&&y((u=c.state.activeRoute)==null?void 0:u.meta.keepalive)}),ft("mainScrollbarRef",d),(h,u)=>{const g=f("router-view"),v=f("el-scrollbar"),l=f("el-main");return i(),k(l,{class:"layout-main"},{default:s(()=>[n(v,{class:"layout-main-scrollbar",style:le(e(kt)()),ref_key:"mainScrollbarRef",ref:d},{default:s(()=>[n(g,null,{default:s(({Component:a})=>[n(Be,{name:e(r).layout.mainAnimation,mode:"out-in"},{default:s(()=>[(i(),k(_t,{include:p.keepAliveComponentNameList},[(i(),k(Se(a),{key:p.componentKey}))],1032,["include"]))]),_:2},1032,["name"])]),_:1})]),_:1},8,["style"])]),_:1})}}}),ye=z(Oo,[["__scopeId","data-v-ce1a5bf4"]]),Ko=_=>(We("data-v-0aa634f1"),_=_(),Oe(),_),jo=["title"],Go=Ko(()=>m("div",{class:"close-full-screen-on"},null,-1)),Xo=R({__name:"closeFullScreen",setup(_){const t=H(),o=O({closeBoxTop:20});G(()=>{setTimeout(()=>{o.closeBoxTop=-30},300)});const r=()=>{o.closeBoxTop=20},c=()=>{o.closeBoxTop=-30},d=()=>{t.setFullScreen(!1)};return(p,y)=>{const h=f("Icon");return i(),B("div",{title:p.$t("layouts.Exit full screen"),onMouseover:se(r,["stop"]),onMouseout:se(c,["stop"])},[m("div",{onClick:se(d,["stop"]),class:"close-full-screen",style:le({top:o.closeBoxTop+"px"})},[n(h,{name:"el-icon-Close"})],4),Go],40,jo)}}}),he=z(Xo,[["__scopeId","data-v-0aa634f1"]]),Jo=R({__name:"default",setup(_){const t=H();return(o,r)=>{const c=f("el-container");return i(),B(U,null,[n(c,{class:"layout-container"},{default:s(()=>[n(Me),n(c,{class:"content-wrapper"},{default:s(()=>[n(be),n(ye)]),_:1})]),_:1}),e(t).state.tabFullScreen?(i(),k(he,{key:0})):A("",!0)],64)}}}),Yo=z(Jo,[["__scopeId","data-v-59d252c1"]]),Zo=R({__name:"classic",setup(_){const t=H();return(o,r)=>{const c=f("el-container");return i(),B(U,null,[n(c,{class:"layout-container"},{default:s(()=>[n(Me),n(c,{class:"content-wrapper"},{default:s(()=>[n(be),n(ye)]),_:1})]),_:1}),e(t).state.tabFullScreen?(i(),k(he,{key:0})):A("",!0)],64)}}}),Qo=z(Zo,[["__scopeId","data-v-fb349671"]]),en=R({__name:"streamline",setup(_){const t=H();return(o,r)=>{const c=f("el-container");return i(),B(U,null,[n(c,{class:"layout-container"},{default:s(()=>[n(c,{class:"content-wrapper"},{default:s(()=>[n(be),n(ye)]),_:1})]),_:1}),e(t).state.tabFullScreen?(i(),k(he,{key:0})):A("",!0)],64)}}}),tn=z(en,[["__scopeId","data-v-fcdc1bd3"]]),on=R({__name:"double",setup(_){const t=H();return(o,r)=>{const c=f("el-container");return i(),B(U,null,[n(c,{class:"layout-container"},{default:s(()=>[n(Me),n(c,{class:"content-wrapper"},{default:s(()=>[n(be),n(ye)]),_:1})]),_:1}),e(t).state.tabFullScreen?(i(),k(he,{key:0})):A("",!0)],64)}}}),nn=z(on,[["__scopeId","data-v-d08319bd"]]),_n=R({components:{Default:Yo,Classic:Qo,Streamline:tn,Double:nn},__name:"index",setup(_){const t=Te(),o=H(),r=P(),c=oe(),d=we(),p=Pe(),y=O({autoMenuCollapseLock:!1});G(()=>{if(!p.token)return qe.push({name:"adminLogin"});h(),xe(),ke(window,"resize",xe)}),je(()=>{u(),ke(window,"resize",u)});const h=()=>{bt().then(g=>{if(d.dataFill(g.data.siteConfig),t.changePort(g.data.terminal.installServicePort),t.changePackageManager(g.data.terminal.npmPackageManager),d.setInitialize(!0),Fe(g.data.adminInfo)||(p.dataFill(g.data.adminInfo),d.setUserInitialize(!0)),g.data.menus){if(Ct(g.data.menus),c.params.to){const l=JSON.parse(c.params.to);if(l.path!=Ne){let a=Fe(l.query)?{}:l.query;pe({path:l.path,query:a});return}}let v=$e(o.state.tabsViewRoutes);v&&pe(v.path)}})},u=()=>{let g={layoutMode:r.layout.layoutMode,menuCollapse:r.layout.menuCollapse},v=ne.get(re);if(v||ne.set(re,g),document.body.clientWidth<1024)y.autoMenuCollapseLock||(y.autoMenuCollapseLock=!0,r.setLayout("menuCollapse",!0)),r.setLayout("shrink",!0),r.setLayoutMode("Classic");else{y.autoMenuCollapseLock=!1;let a=v||g;r.setLayout("menuCollapse",a.menuCollapse),r.setLayout("shrink",!1),r.setLayoutMode(a.layoutMode)}};return(g,v)=>(i(),k(Se(e(r).layout.layoutMode)))}});export{_n as default};
|