import{d as A,O as V,_ as W,u as x,s as F,t as k,D as C,Q as M,$ as O,a as q,Y as N,o as U,a8 as H,c as p,f as l,M as d,m as a,g as y,W as j,V as L,l as f,h,k as _,e as u,a9 as J,i as Q,af as Y}from"./index.3a30a18d.js";import{_ as w}from"./index.vue_vue_type_script_setup_true_name_svgIcon_lang.a38ecbcd.js";const z=A({name:"navMenuVertical"}),Z=A({...z,props:{menuList:{type:Array,default:()=>[]}},setup(I){const $=I,D=V(()=>W(()=>import("./subItem.46ff2279.js"),["subItem.46ff2279.js","index.vue_vue_type_script_setup_true_name_svgIcon_lang.a38ecbcd.js","index.3a30a18d.js","index.dbc27bcc.css"],import.meta.url)),S=x(),{themeConfig:o}=F(S),{menuList:m}=k($),b=C(()=>{if(!(localStorage.getItem("userInfo")&&JSON.parse(localStorage.getItem("userInfo"))||{}).superviseDesk){let s=[];m.value.forEach(n=>{n.meta.title!=="\u4F01\u4E1A\u4FE1\u606F"&&s.push(n)}),m.value=s}return m.value}),E=C(()=>o.value),c=M(),R=O(),i=q({defaultActive:c.meta.isDynamic?c.meta.isDynamicPath:c.path,isCollapse:!1}),{defaultActive:v,isCollapse:B}=k(i),g=t=>{const{path:s,meta:n}=t,r=n.isDynamic?n.isDynamicPath.split("/"):s.split("/");return r.length>=4&&n.isHide?r.splice(0,3).join("/"):s},P=t=>{const{origin:s,pathname:n}=window.location;R.push(t.path),Y(t.meta.isLink)?window.open(t.meta.isLink):window.open(`${s}${n}#${t.meta.isLink}`)};return N(o.value,()=>{console.log(o.value),document.body.clientWidth<=1e3?i.isCollapse=!1:i.isCollapse=o.value.isCollapse},{immediate:!0}),U(()=>{i.defaultActive=g(c)}),H(t=>{console.log(t),i.defaultActive=g(t),document.body.clientWidth<1e3&&(o.value.isCollapse=!1)}),(t,s)=>{const n=p("el-sub-menu"),r=p("el-menu-item"),T=p("el-menu");return l(),d(T,{router:"","default-active":u(v),"background-color":"transparent",collapse:u(B),"unique-opened":u(E).isUniqueOpened,"collapse-transition":!1},{default:a(()=>[(l(!0),y(L,null,j(u(b),e=>(l(),y(L,null,[e.children&&e.children.length>0?(l(),d(n,{index:e.path,key:e.path},{title:a(()=>[f(w,{name:e.meta.icon},null,8,["name"]),h("span",null,_(t.$t(e.meta.title)),1)]),default:a(()=>[f(u(D),{chil:e.children},null,8,["chil"])]),_:2},1032,["index"])):(l(),d(r,{index:e.path,key:e.path},J({default:a(()=>[f(w,{name:e.meta.icon},null,8,["name"])]),_:2},[!e.meta.isLink||e.meta.isLink&&e.meta.isIframe?{name:"title",fn:a(()=>[h("span",null,_(t.$t(e.meta.title)),1)]),key:"0"}:{name:"title",fn:a(()=>[h("a",{class:"w100",onClick:Q(G=>P(e),["prevent"])},_(t.$t(e.meta.title)),9,["onClick"])]),key:"1"}]),1032,["index"]))],64))),256))]),_:1},8,["default-active","collapse","unique-opened"])}}});export{Z as default};
