1 |
- var E=Object.defineProperty,$=Object.defineProperties;var P=Object.getOwnPropertyDescriptors;var v=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var h=(s,e,t)=>e in s?E(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,p=(s,e)=>{for(var t in e||(e={}))C.call(e,t)&&h(s,t,e[t]);if(v)for(var t of v(e))T.call(e,t)&&h(s,t,e[t]);return s},c=(s,e)=>$(s,P(e));import{f as z,o as L,w as R,m as g,d as b,t as S,v as l,x as u,C as I,B as o,bQ as F,I as N,A as d,_ as B,bt as V,F as m,aq as _,bl as w,z as y,bR as q,c as A,L as H,av as M}from"./index.050174ca.js";const Q=(s,e=0)=>{if(e===0)return s;const t=z(!1);let n=0;const r=()=>{n&&clearTimeout(n),n=window.setTimeout(()=>{t.value=s.value},e)};return L(r),R(()=>s.value,a=>{a?r():t.value=a}),t},j=g({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),D=g({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),G={name:"ElSkeletonItem"},J=b(c(p({},G),{props:D,setup(s){const e=S("skeleton");return(t,n)=>(l(),u("div",{class:d([o(e).e("item"),o(e).e(t.variant)])},[t.variant==="image"?(l(),I(o(F),{key:0})):N("v-if",!0)],2))}}));var i=B(J,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]);const K={name:"ElSkeleton"},O=b(c(p({},K),{props:j,setup(s,{expose:e}){const t=s,n=S("skeleton"),r=Q(V(t,"loading"),t.throttle);return e({uiLoading:r}),(a,W)=>o(r)?(l(),u("div",w({key:0,class:[o(n).b(),o(n).is("animated",a.animated)]},a.$attrs),[(l(!0),u(m,null,_(a.count,f=>(l(),u(m,{key:f},[a.loading?y(a.$slots,"template",{key:f},()=>[A(i,{class:d(o(n).is("first")),variant:"p"},null,8,["class"]),(l(!0),u(m,null,_(a.rows,k=>(l(),I(i,{key:k,class:d([o(n).e("paragraph"),o(n).is("last",k===a.rows&&a.rows>1)]),variant:"p"},null,8,["class"]))),128))]):N("v-if",!0)],64))),128))],16)):y(a.$slots,"default",q(w({key:1},a.$attrs)))}}));var U=B(O,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]);const Z=H(U,{SkeletonItem:i}),x=M(i);export{Z as E,x as a};
|