index-5276fe86.js 1.6 KB

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