index-0daa1bde.js 1.6 KB

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