el-skeleton-item-ee9d8e93.js 1.8 KB

1
  1. import{r as P,b as R,w as A,aK as _,d as p,aM as g,o as t,c as r,A as h,a,aQ as D,D as w,ac as m,aO as b,aR as F,F as k,R as S,aN as x,f as K,m as N,aS as L,aP as M,aT as O,__tla as Q}from"./index-27238c60.js";let $,j=Promise.all([(()=>{try{return Q}catch{}})()]).then(async()=>{const E=_({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),T=_({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),B=p({name:"ElSkeletonItem"});var u=b(p({...B,props:T,setup(d){const i=g("skeleton");return(o,s)=>(t(),r("div",{class:m([a(i).e("item"),a(i).e(o.variant)])},[o.variant==="image"?(t(),h(a(D),{key:0})):w("v-if",!0)],2))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]);const I=p({name:"ElSkeleton"});$=M(b(p({...I,props:E,setup(d,{expose:i}){const o=d,s=g("skeleton"),v=((e,c=0)=>{if(c===0)return e;const l=P(!1);let n=0;const f=()=>{n&&clearTimeout(n),n=window.setTimeout(()=>{l.value=e.value},c)};return R(f),A(()=>e.value,y=>{y?f():l.value=y}),l})(F(o,"loading"),o.throttle);return i({uiLoading:v}),(e,c)=>a(v)?(t(),r("div",N({key:0,class:[a(s).b(),a(s).is("animated",e.animated)]},e.$attrs),[(t(!0),r(k,null,S(e.count,l=>(t(),r(k,{key:l},[e.loading?x(e.$slots,"template",{key:l},()=>[K(u,{class:m(a(s).is("first")),variant:"p"},null,8,["class"]),(t(!0),r(k,null,S(e.rows,n=>(t(),h(u,{key:n,class:m([a(s).e("paragraph"),a(s).is("last",n===e.rows&&e.rows>1)]),variant:"p"},null,8,["class"]))),128))]):w("v-if",!0)],64))),128))],16)):x(e.$slots,"default",L(N({key:1},e.$attrs)))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]),{SkeletonItem:u}),O(u)});export{$ as E,j as __tla};