import{d as w,O as T,P as V,i as q,s as M,t as A,c as E,R as N,a3 as O,h as W,a1 as j,j as U,ab as H,l as p,o as a,b as d,y as i,K as f,a as h,Z as J,Y as _,x as C,e as g,q as k,u as l,X as K,m as X,ag as Y,_ as Z}from"./index.4042ed24.js";import D from"./index.e7b6d9ba.js";const z=w({name:"navMenuVertical"}),G=w({...z,props:{menuList:{type:Array,default:()=>[]}},setup(L){const b=L,v=T(()=>V(()=>import("./subItem.a5213aa9.js"),["subItem.a5213aa9.js","index.4042ed24.js","index.dbc27bcc.css","index.e7b6d9ba.js"],import.meta.url)),I=q(),{themeConfig:o}=M(I),{menuList:m}=A(b),F=E(()=>{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}),x=E(()=>o.value),c=N(),B=O(),u=W({defaultActive:c.meta.isDynamic?c.meta.isDynamicPath:c.path,isCollapse:!1}),{defaultActive:S,isCollapse:R}=A(u),y=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},$=t=>{const{origin:s,pathname:n}=window.location;B.push(t.path),Y(t.meta.isLink)?window.open(t.meta.isLink):window.open(`${s}${n}#${t.meta.isLink}`)};return j(o.value,()=>{console.log(o.value),document.body.clientWidth<=1e3?u.isCollapse=!1:u.isCollapse=o.value.isCollapse},{immediate:!0}),U(()=>{u.defaultActive=y(c)}),H(t=>{console.log(t),u.defaultActive=y(t),document.body.clientWidth<1e3&&(o.value.isCollapse=!1)}),(t,s)=>{const n=p("el-sub-menu"),r=p("el-menu-item"),P=p("el-menu");return a(),d(P,{router:"","default-active":l(S),"background-color":"transparent",collapse:l(R),"unique-opened":l(x).isUniqueOpened,"collapse-transition":!1},{default:i(()=>[f(" {{menuLists}} "),(a(!0),h(_,null,J(l(F),e=>(a(),h(_,null,[f(" \u52A0\u8F7D\u4E00\u7EA7\u8DEF\u7531\u5305\u542Bchildren \u4E00\u7EA7\u83DC\u5355"),e.children&&e.children.length>0?(a(),d(n,{index:e.path,key:e.path},{title:i(()=>[C(D,{name:e.meta.icon},null,8,["name"]),g("span",null,k(t.$t(e.meta.title)),1)]),default:i(()=>[C(l(v),{chil:e.children},null,8,["chil"])]),_:2},1032,["index"])):(a(),h(_,{key:1},[f(" \u52A0\u8F7D\u4E00\u7EA7\u83DC\u5355,\u6CA1\u5E26children\uFF0C\u6BD4\u5982\u9996\u9875... "),(a(),d(r,{index:e.path,key:e.path},K({default:i(()=>[C(D,{name:e.meta.icon},null,8,["name"])]),_:2},[!e.meta.isLink||e.meta.isLink&&e.meta.isIframe?{name:"title",fn:i(()=>[g("span",null,k(t.$t(e.meta.title)),1)]),key:"0"}:{name:"title",fn:i(()=>[g("a",{class:"w100",onClick:X(Q=>$(e),["prevent"])},k(t.$t(e.meta.title)),9,["onClick"])]),key:"1"}]),1032,["index"]))],64))],64))),256))]),_:1},8,["default-active","collapse","unique-opened"])}}}),ne=Z(G,[["__file","/data/jenkins/workspace/badp-bcxin-web-5.x-dispatchBusiness/src/layout/navMenu/vertical.vue"]]);export{ne as default};
