You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
1.2 KiB
2 lines
1.2 KiB
var g=(n,u,a)=>new Promise((i,c)=>{var l=t=>{try{s(a.next(t))}catch(r){c(r)}},m=t=>{try{s(a.throw(t))}catch(r){c(r)}},s=t=>t.done?i(t.value):Promise.resolve(t.value).then(l,m);s((a=a.apply(n,u)).next())});import{r as C,cb as F,cc as I,cd as N,aC as O,f as M,u as e,ce as h,O as S,cf as w,cg as R,ch as b,c3 as B,ci as H}from"./index-f4658ae7.js";function x(n){const u=C([]),{currentRoute:a}=F(),{getIsMobile:i}=I(),c=N(),{setMenuSetting:l,getIsHorizontal:m,getSplit:s}=O(),t=B(E,50),r=M(()=>e(n)!==h.LEFT&&!e(m)),L=M(()=>!e(s)||e(n)!==h.LEFT),v=M(()=>e(n)===h.TOP),P=M(()=>e(n)===h.NONE||!e(s));S([()=>e(a).path,()=>e(n)],d=>g(this,[d],function*([o]){if(e(r)||e(i))return;const{meta:T}=e(a),A=T.currentActiveMenu;let f=yield w(o);f||(f=yield w(A)),f&&t(f)}),{immediate:!0}),S([()=>c.getLastBuildMenuTime,()=>c.getBackMenuList],()=>{p()},{immediate:!0}),S(()=>s.value,()=>{e(r)||p()});function E(o){return g(this,null,function*(){if(e(L)||e(i))return;const d=yield H(o);if(!d||!d.length){l({hidden:!0}),u.value=[];return}l({hidden:!1}),u.value=d})}function p(){return g(this,null,function*(){if(e(P)||e(i)){u.value=yield R();return}if(e(v)){const o=yield b();u.value=o;return}})}return{menusRef:u}}export{x as useSplitMenu};
|