el-skeleton-item-09206913.js 1.8 KB

1
  1. import{r as F,B as J,aS as K,b2 as f,d as p,b4 as _,o as t,c as r,l as g,a,b9 as L,a2 as h,W as m,b6 as w,ba as P,F as k,k as S,aJ as x,i as W,ai as $,aK as j,b7 as q,bb as z,__tla as A}from"./index-af173888.js";let B,C=Promise.all([(()=>{try{return A}catch{}})()]).then(async()=>{const E=f({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),N=f({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),I=p({name:"ElSkeletonItem"});var u=w(p({...I,props:N,setup(d){const i=_("skeleton");return(o,s)=>(t(),r("div",{class:m([a(i).e("item"),a(i).e(o.variant)])},[o.variant==="image"?(t(),g(a(L),{key:0})):h("v-if",!0)],2))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]);const T=p({name:"ElSkeleton"});B=q(w(p({...T,props:E,setup(d,{expose:i}){const o=d,s=_("skeleton"),v=((e,c=0)=>{if(c===0)return e;const l=F(!1);let n=0;const y=()=>{n&&clearTimeout(n),n=window.setTimeout(()=>{l.value=e.value},c)};return J(y),K(()=>e.value,b=>{b?y():l.value=b}),l})(P(o,"loading"),o.throttle);return i({uiLoading:v}),(e,c)=>a(v)?(t(),r("div",$({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},()=>[W(u,{class:m(a(s).is("first")),variant:"p"},null,8,["class"]),(t(!0),r(k,null,S(e.rows,n=>(t(),g(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))]):h("v-if",!0)],64))),128))],16)):x(e.$slots,"default",j($({key:1},e.$attrs)))}}),[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]),{SkeletonItem:u}),z(u)});export{B as E,C as __tla};