horizontal.1849f0c6.js 4.3 KB

123
  1. import{_ as V}from"./preload-helper.41c905a7.js";import{e as v,ag as j,r as O,ai as g,ah as P,G as F,f as N,aj as U,o as q,aJ as W,a0 as a,g as l,h as p,A as i,q as r,F as k,Q as G,p as y,j as C,z as f,u as J,V as Q,y as L,U as S,L as Y}from"./vue.e266cb73.js";import{u as K}from"./routesList.786cc129.js";import{u as X}from"./themeConfig.ed8e6a95.js";import{o as Z}from"./other.ff093a0c.js";import{e as ee}from"./mitt.7f99bbc0.js";import{_ as te}from"./_plugin-vue_export-helper.c27b6911.js";import"./index.f84209b0.js";import"./index.e4075ce8.js";import"./_commonjsHelpers.35101cd5.js";import"./index.3f666869.js";import"./keepAliveNames.4207d036.js";import"./storage.acfc8920.js";import"./userInfo.0308cef3.js";import"./loading.85c4a19d.js";import"./tagsViewRoutes.02a94730.js";import"./request.1f3df8c8.js";import"./config.3668004a.js";import"./index.4f91577e.js";import"./index.dcc65bf7.js";import"./Urls.a85bb052.js";import"./index.8a8cbd14.js";import"./vue-i18n.cjs.825cc1d7.js";import"./toolsValidate.7cb139e2.js";const ne={class:"el-menu-horizontal-warp"},oe=v({name:"navMenuHorizontal"}),se=v({...oe,props:{menuList:{type:Array,default:()=>[]}},setup(R){const z=R,A=j(()=>V(()=>import("./subItem.c8589917.js"),["./subItem.c8589917.js","./vue.e266cb73.js","./other.ff093a0c.js","./preload-helper.41c905a7.js","./index.f84209b0.js","./index.e4075ce8.js","./_commonjsHelpers.35101cd5.js","./index.3f666869.js","./keepAliveNames.4207d036.js","./routesList.786cc129.js","./themeConfig.ed8e6a95.js","./storage.acfc8920.js","./userInfo.0308cef3.js","./loading.85c4a19d.js","./loading.70fbfd85.css","./tagsViewRoutes.02a94730.js","./request.1f3df8c8.js","./config.3668004a.js","./index.4f91577e.js","./index.dcc65bf7.js","./Urls.a85bb052.js","./index.8b89e2e0.css","./index.8a8cbd14.js","./vue-i18n.cjs.825cc1d7.js","./toolsValidate.7cb139e2.js","./_plugin-vue_export-helper.c27b6911.js","./subItem.8f9e68ee.css"],import.meta.url)),c=O(),M=K(),x=X(),{routesList:$}=g(M),{themeConfig:d}=g(x),w=P(),u=F({defaultActive:""}),D=N(()=>z.menuList),b=n=>{const e=n.wheelDelta||-n.deltaY*40;c.value.$refs.wrapRef.scrollLeft=c.value.$refs.wrapRef.scrollLeft+e/4},H=()=>{Y(()=>{let n=document.querySelector(".el-menu.el-menu--horizontal li.is-active");if(!n)return!1;c.value.$refs.wrapRef.scrollLeft=n.offsetLeft})},_=n=>n.filter(e=>{var t;return!((t=e.meta)!=null&&t.isHide)}).map(e=>(e=Object.assign({},e),e.children&&(e.children=_(e.children)),e)),B=n=>{const e=n.split("/");let t={children:[]};return _($.value).map((s,m)=>{s.path===`/${e[1]}`&&(s.k=m,t.item={...s},t.children=[{...s}],s.children&&(t.children=s.children))}),t},h=n=>{const{path:e,meta:t}=n;if(d.value.layout==="classic")u.defaultActive=`/${e==null?void 0:e.split("/")[1]}`;else{const s=t!=null&&t.isDynamic?t.isDynamicPath.split("/"):e.split("/");s.length>=4&&(t==null?void 0:t.isHide)?u.defaultActive=s.splice(0,3).join("/"):u.defaultActive=e}},I=n=>{Z.handleOpenLink(n)};return U(()=>{h(w)}),q(()=>{H()}),W(n=>{h(n);let{layout:e,isClassicSplitMenu:t}=d.value;e==="classic"&&t&&ee.emit("setSendClassicChildren",B(n.path))}),(n,e)=>{const t=a("SvgIcon"),s=a("el-sub-menu"),m=a("el-menu-item"),T=a("el-menu"),E=a("el-scrollbar");return l(),p("div",ne,[i(E,{onWheel:S(b,["prevent"]),ref_key:"elMenuHorizontalScrollRef",ref:c},{default:r(()=>[i(T,{router:"","default-active":u.defaultActive,ellipsis:!1,"background-color":"transparent",mode:"horizontal"},{default:r(()=>[(l(!0),p(k,null,G(D.value,o=>(l(),p(k,null,[o.children&&o.children.length>0?(l(),y(s,{index:o.path,key:o.path},{title:r(()=>[i(t,{name:o.meta.icon},null,8,["name"]),C("span",null,f(n.$t(o.meta.title)),1)]),default:r(()=>[i(J(A),{chil:o.children},null,8,["chil"])]),_:2},1032,["index"])):(l(),y(m,{index:o.path,key:o.path},Q({_:2},[!o.meta.isLink||o.meta.isLink&&o.meta.isIframe?{name:"title",fn:r(()=>[i(t,{name:o.meta.icon},null,8,["name"]),L(" "+f(n.$t(o.meta.title)),1)]),key:"0"}:{name:"title",fn:r(()=>[C("a",{class:"w100",onClick:S(ie=>I(o),["prevent"])},[i(t,{name:o.meta.icon},null,8,["name"]),L(" "+f(n.$t(o.meta.title)),1)],8,["onClick"])]),key:"1"}]),1032,["index"]))],64))),256))]),_:1},8,["default-active"])]),_:1},8,["onWheel"])])}}});const we=te(se,[["__scopeId","data-v-0e184458"],["__file","C:/Users/89282/Desktop/lechang_storage/lechang_storage/vue-next-admin/src/layout/navMenu/horizontal.vue"]]);export{we as default};
  2. //# sourceMappingURL=horizontal.1849f0c6.js.map