1 |
- import{az as q,bC as w,bp as p,aK as x,aA as A,d as m,aB as B,r as C,J as o,bs as K,c0 as D,K as F,o as c,c as v,at as f,a as l,q as y,w as J,L,aS as N,aC as P,Y as V,aD as Y,aE as $,__tla as G}from"./index-2eab2d23.js";let _,H=Promise.all([(()=>{try{return G}catch{}})()]).then(async()=>{const S=q({size:{type:[Number,String],values:w,default:"",validator:s=>p(s)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:x},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:A(String),default:"cover"}}),d={error:s=>s instanceof Event},g=["src","alt","srcset"],h=m({name:"ElAvatar"});_=$(Y(m({...h,props:S,emits:d,setup(s,{emit:b}){const t=s,e=B("avatar"),n=C(!1),k=o(()=>{const{size:a,icon:i,shape:u}=t,r=[e.b()];return K(a)&&r.push(e.m(a)),i&&r.push(e.m("icon")),u&&r.push(e.m(u)),r}),z=o(()=>{const{size:a}=t;return p(a)?e.cssVarBlock({size:D(a)||""}):void 0}),E=o(()=>({objectFit:t.fit}));function j(a){n.value=!0,b("error",a)}return F(()=>t.src,()=>n.value=!1),(a,i)=>(c(),v("span",{class:V(l(k)),style:f(l(z))},[!a.src&&!a.srcSet||n.value?a.icon?(c(),y(l(N),{key:1},{default:J(()=>[(c(),y(L(a.icon)))]),_:1})):P(a.$slots,"default",{key:2}):(c(),v("img",{key:0,src:a.src,alt:a.alt,srcset:a.srcSet,style:f(l(E)),onError:j},null,44,g))],6))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/avatar/src/avatar.vue"]]))});export{_ as E,H as __tla};
|