index.a3c2e90b.js 1.8 KB

1
  1. import{v as o,d as l,c as a,X as h,H as r,ba as S,C as d,x as P,D as A,w as m,F as z,a7 as b,z as i}from"./ResizeObserver.es.7b3c8c20.js";const[T,B]=o("skeleton-title"),D={round:Boolean,titleWidth:r};var f=l({name:T,props:D,setup(e){return()=>a("h3",{class:B([{round:e.round}]),style:{width:h(e.titleWidth)}},null)}});const[I,F]=o("skeleton-avatar"),N={avatarSize:r,avatarShape:d("round")};var g=l({name:I,props:N,setup(e){return()=>a("div",{class:F([e.avatarShape]),style:S(e.avatarSize)},null)}});const u="100%",R={round:Boolean,rowWidth:{type:r,default:u}},[C,H]=o("skeleton-paragraph");var W=l({name:C,props:R,setup(e){return()=>a("div",{class:H([{round:e.round}]),style:{width:e.rowWidth}},null)}});const[L,c]=o("skeleton"),U="60%",E={row:A(0),round:Boolean,title:Boolean,titleWidth:r,avatar:Boolean,avatarSize:r,avatarShape:d("round"),loading:m,animate:m,rowWidth:{type:[Number,String,Array],default:u}};var O=l({name:L,inheritAttrs:!1,props:E,setup(e,{slots:s,attrs:k}){const w=()=>{if(e.avatar)return a(g,{avatarShape:e.avatarShape,avatarSize:e.avatarSize},null)},p=()=>{if(e.title)return a(f,{round:e.round,titleWidth:e.titleWidth},null)},y=n=>{const{rowWidth:t}=e;return t===u&&n===+e.row-1?U:Array.isArray(t)?t[n]:t},_=()=>Array(+e.row).fill("").map((n,t)=>a(W,{key:t,round:e.round,rowWidth:h(y(t))},null)),$=()=>s.template?s.template():a(z,null,[w(),a("div",{class:c("content")},[p(),_()])]);return()=>{var n;return e.loading?a("div",P({class:c({animate:e.animate,round:e.round})},k),[$()]):(n=s.default)==null?void 0:n.call(s)}}});const[q,v]=o("skeleton-image"),x={imageSize:r,imageShape:d("square")};var V=l({name:q,props:x,setup(e){return()=>a("div",{class:v([e.imageShape]),style:S(e.imageSize)},[a(b,{name:"photo",class:v("icon")},null)])}});i(V);i(f);i(g);i(W);const j=i(O);export{j as S};