This commit is contained in:
oneao committed 2025-06-18 16:30:01 +08:00
1 parent bcc4722efc
commit f48536774f
403 files changed
+34776

No files matched your search

@@ -0,0 +1 @@
import{b as c,ao as Ve,H as R,$ as G,_ as V,d as _,c as O,o as k,f as P,a as oe,n as b,g as Q,k as le,v as se,s as Z,l as F,i as E,am as H,t as X,Z as ne,e as N,C as U,u as S,h as te,m as T,j as sn,ap as ye,aq as Ie,x as rn,F as ge,r as an,ar as fe,A as C,as as un,q as v,D as x,G as J,at as cn,au as pn,T as dn,ae as vn,I as fn,av as mn,aw as yn,ax as we,y as gn,z as hn,a2 as Cn,S as $n,E as bn,B as Mn}from"./index-C4UKuwCQ.js";/* empty css */import{u as Pe}from"./use-merge-state-BIwn2CEf.js";import{r as Oe,s as kn}from"./index-ETHic_Vr.js";import{R as Sn}from"./render-function-D5Sjj29y.js";import{I as In}from"./index-BMrux7Sq.js";import{T as wn}from"./index-B3Ic4ZHL.js";const Pn=Symbol("SiderInjectionKey");function On(e,n){const t=c(()=>Ve(e)?e.value:e);let o="";R(()=>{o=Oe.subscribe((s,r)=>{t.value&&(!r||r===t.value)&&n(!!s[t.value])})}),G(()=>{o&&Oe.unsubscribe(o)})}const he=Symbol("MenuInjectionKey"),Ce=Symbol("LevelInjectionKey"),Re=Symbol("DataCollectorInjectionKey"),_n=_({name:"IconMenuFold",props:{size:{type:[Number,String]},strokeWidth:{type:Number,default:4},strokeLinecap:{type:String,default:"butt",validator:e=>["butt","round","square"].includes(e)},strokeLinejoin:{type:String,default:"miter",validator:e=>["arcs","bevel","miter","miter-clip","round"].includes(e)},rotate:Number,spin:Boolean},emits:{click:e=>!0},setup(e,{emit:n}){const t=Q("icon"),o=c(()=>[t,`${t}-menu-fold`,{[`${t}-spin`]:e.spin}]),s=c(()=>{const l={};return e.size&&(l.fontSize=le(e.size)?`${e.size}px`:e.size),e.rotate&&(l.transform=`rotate(${e.rotate}deg)`),l});return{cls:o,innerStyle:s,onClick:l=>{n("click",l)}}}}),xn=["stroke-width","stroke-linecap","stroke-linejoin"],Bn=P("path",{d:"M42 11H6M42 24H22M42 37H6M13.66 26.912l-4.82-3.118 4.82-3.118v6.236Z"},null,-1),Kn=[Bn];function Nn(e,n,t,o,s,r){return k(),O("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:b(e.cls),style:oe(e.innerStyle),"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin,onClick:n[0]||(n[0]=(...l)=>e.onClick&&e.onClick(...l))},Kn,14,xn)}var ce=V(_n,[["render",Nn]]);const jn=Object.assign(ce,{install:(e,n)=>{var t;const o=(t=n==null?void 0:n.iconPrefix)!=null?t:"";e.component(o+ce.name,ce)}}),Ln=_({name:"IconMenuUnfold",props:{size:{type:[Number,String]},strokeWidth:{type:Number,default:4},strokeLinecap:{type:String,default:"butt",validator:e=>["butt","round","square"].includes(e)},strokeLinejoin:{type:String,default:"miter",validator:e=>["arcs","bevel","miter","miter-clip","round"].includes(e)},rotate:Number,spin:Boolean},emits:{click:e=>!0},setup(e,{emit:n}){const t=Q("icon"),o=c(()=>[t,`${t}-menu-unfold`,{[`${t}-spin`]:e.spin}]),s=c(()=>{const l={};return e.size&&(l.fontSize=le(e.size)?`${e.size}px`:e.size),e.rotate&&(l.transform=`rotate(${e.rotate}deg)`),l});return{cls:o,innerStyle:s,onClick:l=>{n("click",l)}}}}),En=["stroke-width","stroke-linecap","stroke-linejoin"],Tn=P("path",{d:"M6 11h36M22 24h20M6 37h36M8 20.882 12.819 24 8 27.118v-6.236Z"},null,-1),Dn=[Tn];function Vn(e,n,t,o,s,r){return k(),O("svg",{viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg",stroke:"currentColor",class:b(e.cls),style:oe(e.innerStyle),"stroke-width":e.strokeWidth,"stroke-linecap":e.strokeLinecap,"stroke-linejoin":e.strokeLinejoin,onClick:n[0]||(n[0]=(...l)=>e.onClick&&e.onClick(...l))},Dn,14,En)}var pe=V(Ln,[["render",Vn]]);const Rn=Object.assign(pe,{install:(e,n)=>{var t;const o=(t=n==null?void 0:n.iconPrefix)!=null?t:"";e.component(o+pe.name,pe)}});function $e(e){const n=c(()=>Ve(e)?e.value:e);Z(Ce,F({level:n}))}function Y(e){const{provideNextLevel:n}=e||{},t=se(Ce),o=c(()=>(t==null?void 0:t.level)||1);if(n){const s=c(()=>o.value+1);$e(s)}return{level:o}}function _e(e,n){const t=[],o=s=>{s.forEach(r=>{n(r)&&t.push(r.key),r.children&&o(r.children)})};return o(e),t}function ze(e=!1){return e?void 0:se(Re)}function He(e){const{key:n,type:t}=e,o=E([]),s=ze(t==="menu");return Z(Re,{collectSubMenu(l,a,i=!1){const u={key:l,children:a};if(i){const p=o.value.find(f=>f.key===l);p?p.children=a:o.value.push(u)}else o.value=[...o.value,u];i&&(t==="popupMenu"?s==null||s.reportMenuData(o.value):t==="subMenu"&&!H(l)&&(s==null||s.collectSubMenu(l,o.value,!0)))},removeSubMenu(l){o.value=o.value.filter(a=>a.key!==l)},collectMenuItem(l){o.value.push({key:l})},removeMenuItem(l){o.value=o.value.filter(a=>a.key!==l)},reportMenuData(l){o.value=l,t==="subMenu"&&!H(n)&&(s==null||s.collectSubMenu(n,o.value,!0))}}),t==="subMenu"&&!H(n)?(R(()=>{s==null||s.collectSubMenu(n,o.value)}),G(()=>{s==null||s.removeSubMenu(n)})):t==="popupMenu"&&R(()=>{s==null||s.reportMenuData(o.value)}),{menuData:o,subMenuKeys:c(()=>_e(o.value,l=>!!l.children)),menuItemKeys:c(()=>_e(o.value,l=>!l.children))}}function zn(e,n){const t=[],o=s=>{for(let r=0;r<s.length;r++){const l=s[r];if(l.key===n)return!0;if(l.children){if(t.push(l.key),o(l.children))return!0;t.pop()}}return!1};return o(e),t}function Hn(eLine truncated