el-skeleton-item-a08638a3.js 1.8 KB

1
  1. import{r as T,k as q,K as z,az as _,d as p,aB as g,o as t,c as r,q as h,a,aF as C,O as w,Y as m,aD as b,aG as D,F as k,n as x,aC as E,f as G,ai as S,aH as H,aE as K,aI as L,__tla as O}from"./index-2eab2d23.js";let $,P=Promise.all([(()=>{try{return O}catch{}})()]).then(async()=>{const B=_({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),I=_({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),N=p({name:"ElSkeletonItem"});var u=b(p({...N,props:I,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(C),{key:0})):w("v-if",!0)],2))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]);const F=p({name:"ElSkeleton"});$=K(b(p({...F,props:B,setup(d,{expose:i}){const o=d,s=g("skeleton"),v=((e,c=0)=>{if(c===0)return e;const l=T(!1);let n=0;const f=()=>{n&&clearTimeout(n),n=window.setTimeout(()=>{l.value=e.value},c)};return q(f),z(()=>e.value,y=>{y?f():l.value=y}),l})(D(o,"loading"),o.throttle);return i({uiLoading:v}),(e,c)=>a(v)?(t(),r("div",S({key:0,class:[a(s).b(),a(s).is("animated",e.animated)]},e.$attrs),[(t(!0),r(k,null,x(e.count,l=>(t(),r(k,{key:l},[e.loading?E(e.$slots,"template",{key:l},()=>[G(u,{class:m(a(s).is("first")),variant:"p"},null,8,["class"]),(t(!0),r(k,null,x(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)):E(e.$slots,"default",H(S({key:1},e.$attrs)))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]),{SkeletonItem:u}),L(u)});export{$ as E,P as __tla};