index-fc00eb76.js 1.6 KB

12
  1. import{j as l,d as i,g as a,G as v,t as r,D as s,H as w,n as m,ao as g,v as u,m as $,F as y}from"./index-1d4a9afa.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:v(t.titleWidth)}},null)}});const b=s(T);var z=b;const[B,D]=l("skeleton-avatar"),F={avatarSize:r,avatarShape:m("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:m("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:v(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};