import{d as w,O as W,_ as q,u as E,s as I,t as k,D as C,Y as O,a2 as U,a as v,V as H,o as N,ab as j,c as m,f as l,M as p,m as a,g,Q as F,P as y,l as d,h as f,k as h,e as c,ac as Q,i as Y,ah as z}from"./index.2c7321ca.js";import{_ as L}from"./index.vue_vue_type_script_setup_true_name_svgIcon_lang.bc6c7912.js";const G=w({name:"navMenuVertical"}),Z=w({...G,props:{menuList:{type:Array,default:()=>[]}},setup(A){const $=A,b=W(()=>q(()=>import("./subItem.3d78e311.js"),["assets/subItem.3d78e311.js","assets/index.vue_vue_type_script_setup_true_name_svgIcon_lang.bc6c7912.js","assets/index.2c7321ca.js","assets/index.319ce9dc.css"])),D=E(),{themeConfig:i}=I(D),{menuList:P}=k($),R=C(()=>P.value),B=C(()=>i.value),u=O(),T=U(),o=v({defaultActive:u.meta.isDynamic?u.meta.isDynamicPath:u.path,isCollapse:!1}),{defaultActive:V,isCollapse:x}=k(o),_=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},M=t=>{const{origin:s,pathname:n}=window.location;T.push(t.path),z(t.meta.isLink)?window.open(t.meta.isLink):window.open(`${s}${n}#${t.meta.isLink}`)};return H(i.value,()=>{console.log(i.value),document.body.clientWidth<=1e3?o.isCollapse=!1:o.isCollapse=i.value.isCollapse},{immediate:!0}),N(()=>{o.defaultActive=_(u)}),j(t=>{console.log(t),o.defaultActive=_(t),document.body.clientWidth<1e3&&(i.value.isCollapse=!1)}),(t,s)=>{const n=m("el-sub-menu"),r=m("el-menu-item"),S=m("el-menu");return l(),p(S,{router:"","default-active":c(V),"background-color":"transparent",collapse:c(x),"unique-opened":c(B).isUniqueOpened,"collapse-transition":!1},{default:a(()=>[(l(!0),g(y,null,F(c(R),e=>(l(),g(y,null,[e.children&&e.children.length>0?(l(),p(n,{index:e.path,key:e.path},{title:a(()=>[d(L,{name:e.meta.icon},null,8,["name"]),f("span",null,h(t.$t(e.meta.title)),1)]),default:a(()=>[d(c(b),{chil:e.children},null,8,["chil"])]),_:2},1032,["index"])):(l(),p(r,{index:e.path,key:e.path},Q({default:a(()=>[d(L,{name:e.meta.icon},null,8,["name"])]),_:2},[!e.meta.isLink||e.meta.isLink&&e.meta.isIframe?{name:"title",fn:a(()=>[f("span",null,h(t.$t(e.meta.title)),1)]),key:"0"}:{name:"title",fn:a(()=>[f("a",{class:"w100",onClick:Y(J=>M(e),["prevent"])},h(t.$t(e.meta.title)),9,["onClick"])]),key:"1"}]),1032,["index"]))],64))),256))]),_:1},8,["default-active","collapse","unique-opened"])}}});export{Z as default};
