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