aside.CLwehmBr.js 3.3 KB

12
  1. const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index.4jh3dIzp.js","assets/rayLogo.tG_KrCBZ.js","assets/vue.YrNK8sx4.js","assets/index.IRF5Ik0K.js","assets/index.I-CrZeUC.css","assets/logo-mini.DjPeV5ul.js","assets/_plugin-vue_export-helper.DlAUqK2U.js","assets/index.DxUbeB5Y.css","assets/vertical.GhHphTXC.js"])))=>i.map(i=>d[i]);
  2. import{au as x,u as D,b as I,e as l,av as N,_ as v,S as P}from"./index.IRF5Ik0K.js";import{a as w,r as q,aC as d,_ as z,f as C,a5 as O,w as b,aj as L,L as $,T as j,u as m,c as G,o as g,S as f,K as S,J as H,M as J,aA as F,G as K}from"./vue.YrNK8sx4.js";import{f as Q}from"./routeFilter.CCAbkObw.js";const U={class:"h100"},X=w({name:"layoutAside"}),se=w({...X,setup(Y){const A=F(()=>v(()=>import("./index.4jh3dIzp.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))),R=F(()=>v(()=>import("./vertical.GhHphTXC.js"),__vite__mapDeps([8,3,2,4]))),n=q(),p=x(),T=D(),M=I(),{routesList:B}=d(p),{themeConfig:a}=d(T),{isTagsViewCurrenFull:E}=d(M),i=z({menuList:[],clientWidth:0}),V=C(()=>{const{layout:e,isCollapse:t,menuBar:s}=a.value,o=["#FFFFFF","#FFF","#fff","#ffffff"].includes(s)?"layout-el-aside-br-color":"";if(i.clientWidth<=1e3)if(t){document.body.setAttribute("class","el-popup-parent--hidden");const k=document.querySelector(".layout-container"),c=document.createElement("div");return c.setAttribute("class","layout-aside-mobile-mode"),k.appendChild(c),c.addEventListener("click",u),[o,"layout-aside-mobile","layout-aside-mobile-open"]}else return u(),[o,"layout-aside-mobile","layout-aside-mobile-close"];else return e==="columns"?t?[o,"layout-aside-pc-1"]:[o,"layout-aside-pc-220"]:t?[o,"layout-aside-pc-64"]:[o,"layout-aside-pc-220"]}),W=C(()=>{let{layout:e,isShowLogo:t}=a.value;return t&&e==="defaults"||t&&e==="columns"}),u=()=>{const e=document.querySelector(".layout-aside-mobile-mode");e==null||e.setAttribute("style","animation: error-img-two 0.3s"),setTimeout(()=>{var s;(s=e==null?void 0:e.parentNode)==null||s.removeChild(e)},300),document.body.clientWidth<1e3&&(a.value.isCollapse=!1),document.body.setAttribute("class","")},r=()=>{if(a.value.layout==="columns")return!1;console.log(P.get("userInfo").username=="平台管理员"),i.menuList=Q(B.value)},y=e=>{i.clientWidth=e},_=e=>{let{layout:t}=a.value;if(t!=="columns")return!1;e||l.emit("restoreDefault"),p.setColumnsMenuHover(e)};return O(()=>{y(document.body.clientWidth),r(),l.on("setSendColumnsChildren",e=>{i.menuList=e.children}),l.on("setSendClassicChildren",e=>{let{layout:t,isClassicSplitMenu:s}=a.value;t==="classic"&&s&&(i.menuList=[],i.menuList=e.children)}),l.on("getBreadcrumbIndexSetFilterRoutes",()=>{r()}),l.on("layoutMobileResize",e=>{y(e.clientWidth),u()})}),b(a.value,e=>{e.isShowLogoChange!==e.isShowLogo&&n.value&&n.value.update()}),b(N.state,e=>{let{layout:t,isClassicSplitMenu:s}=e.themeConfig.themeConfig;if(t==="classic"&&s)return!1;r()},{deep:!0}),(e,t)=>{const s=L("el-scrollbar"),h=L("el-aside");return $((g(),G("div",U,[f(h,{class:K(["layout-aside",V.value])},{default:S(()=>[W.value?(g(),H(m(A),{key:0})):J("",!0),f(s,{class:"flex-auto",ref_key:"layoutAsideScrollbarRef",ref:n,onMouseenter:t[0]||(t[0]=o=>_(!0)),onMouseleave:t[1]||(t[1]=o=>_(!1))},{default:S(()=>[f(m(R),{menuList:i.menuList},null,8,["menuList"])]),_:1},512)]),_:1},8,["class"])],512)),[[j,!m(E)]])}}});export{se as default};