suyuan-breed/public/pc/_nuxt/dropdown.e188120b.js

2 lines
3.5 KiB
JavaScript
Raw Permalink Normal View History

2024-01-09 15:59:23 +08:00
import{Q as _,aH as w,b5 as b,R as L,a0 as l,a as y,af as B,r as I,V as S,aJ as M,a7 as A,M as P,o as E,h,B as N,u as i,c as T,k as z,D as K,G as Y,X as g,Y as j,Z as v,ap as D,ag as O,T as F,aa as J,aQ as R,bn as u}from"./entry.834fe740.js";import{c as V,u as U}from"./index.411bb0f8.js";const q=_({size:{type:[Number,String],values:w,default:"",validator:t=>b(t)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:L},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:l(String),default:"cover"}}),G={error:t=>t instanceof Event},H=["src","alt","srcset"],Q=y({name:"ElAvatar"}),x=y({...Q,props:q,emits:G,setup(t,{emit:c}){const n=t,o=B("avatar"),a=I(!1),m=S(()=>{const{size:e,icon:r,shape:s}=n,f=[o.b()];return M(e)&&f.push(o.m(e)),r&&f.push(o.m("icon")),s&&f.push(o.m(s)),f}),C=S(()=>{const{size:e}=n;return b(e)?o.cssVarBlock({size:A(e)||""}):void 0}),d=S(()=>({objectFit:n.fit}));P(()=>n.src,()=>a.value=!1);function p(e){a.value=!0,c("error",e)}return(e,r)=>(E(),h("span",{class:j(i(m)),style:N(i(C))},[(e.src||e.srcSet)&&!a.value?(E(),h("img",{key:0,src:e.src,alt:e.alt,srcset:e.srcSet,style:N(i(d)),onError:p},null,44,H)):e.icon?(E(),T(i(Y),{key:1},{default:z(()=>[(E(),T(K(e.icon)))]),_:1})):g(e.$slots,"default",{key:2})],6))}});var W=v(x,[["__file","/home/runner/work/element-plus/element-plus/packages/components/avatar/src/avatar.vue"]]);const pe=D(W),X=y({inheritAttrs:!1});function Z(t,c,n,o,a,m){return g(t.$slots,"default")}var ee=v(X,[["render",Z],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);const te=y({name:"ElCollectionItem",inheritAttrs:!1});function oe(t,c,n,o,a,m){return g(t.$slots,"default")}var se=v(te,[["render",oe],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);const ne="data-el-collection-item",ae=t=>{const c=`El${t}Collection`,n=`${c}Item`,o=Symbol(c),a=Symbol(n),m={...ee,name:c,setup(){const d=I(null),p=new Map;O(o,{itemMap:p,getItems:()=>{const r=i(d);if(!r)return[];const s=Array.from(r.querySelectorAll(`[${ne}]`));return[...p.values()].sort(($,k)=>s.indexOf($.ref)-s.indexOf(k.ref))},collectionRef:d})}},C={...se,name:n,setup(d,{attrs:p}){const e=I(null),r=F(o,void 0);O(a,{collectionItemRef:e}),J(()=>{const s=i(e);s&&r.itemMap.set(s,{ref:s,...p})}),R(()=>{const s=i(e);r.itemMap.delete(s)})}};return{COLLECTION_INJECTION_KEY:o,COLLECTION_ITEM_INJECTION_KEY:a,ElCollection:m,ElCollectionItem:C}},ue=_({trigger:V.trigger,effect:{...U.effect,default:"light"},type:{type:l(String)},placement:{type:l(String),default:"bottom"},popperOptions:{type:l(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:l([Number,String]),default:0},maxHeight:{type:l([Number,String]),default:""},popperClass:{type:String,default:""},disabled:{type:Boolean,default:!1},role:{type:String,default:"menu"},buttonProps:{type:l(Object)}}),me=_({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:L}}),de=_({onKeydown:{type:l(Function)}}),re=[u.down,u.pageDown,u.home],le=[u.up,u.pageUp,u.end],fe=[...re,...le],{ElCollection:Ee,ElCollectionItem:_e,COLLECTION_INJECTION_KEY:ye,COLLECTION_ITEM_INJECTION_KEY:Ce}=ae("Dropdown");export{Ce as C,pe as E,fe as F,le as L,Ee as a,me as b,ae as c,ue as d,ne as e,_e as f,de as g,ye as h};