1 |
- import{aE as w,bK as F,bj as p,bJ as x,aF as J,d as m,aG as P,r as q,e as o,bo as A,c1 as B,O as G,o as c,c as v,ay as y,a as l,k as f,w as H,P as I,aQ as K,aH as N,a1 as O,aI as Q,aJ as V,__tla as $}from"./index-66208f93.js";let _,C=Promise.all([(()=>{try{return $}catch{}})()]).then(async()=>{const d=w({size:{type:[Number,String],values:F,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:J(String),default:"cover"}}),S={error:s=>s instanceof Event},g=["src","alt","srcset"],h=m({name:"ElAvatar"});_=V(Q(m({...h,props:d,emits:S,setup(s,{emit:b}){const t=s,e=P("avatar"),n=q(!1),k=o(()=>{const{size:a,icon:i,shape:u}=t,r=[e.b()];return A(a)&&r.push(e.m(a)),i&&r.push(e.m("icon")),u&&r.push(e.m(u)),r}),E=o(()=>{const{size:a}=t;return p(a)?e.cssVarBlock({size:B(a)||""}):void 0}),z=o(()=>({objectFit:t.fit}));function j(a){n.value=!0,b("error",a)}return G(()=>t.src,()=>n.value=!1),(a,i)=>(c(),v("span",{class:O(l(k)),style:y(l(E))},[!a.src&&!a.srcSet||n.value?a.icon?(c(),f(l(K),{key:1},{default:H(()=>[(c(),f(I(a.icon)))]),_:1})):N(a.$slots,"default",{key:2}):(c(),v("img",{key:0,src:a.src,alt:a.alt,srcset:a.srcSet,style:y(l(z)),onError:j},null,44,g))],6))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/avatar/src/avatar.vue"]]))});export{_ as E,C as __tla};
|