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