1 line
4.1 KiB
JavaScript
1 line
4.1 KiB
JavaScript
import{J as e,Kt as t,N as n,O as r,P as i,T as a,Yt as o,Z as s,b as c,t as l}from"./_plugin-vue_export-helper-Bo3WtfwJ.js";var u=l(i({__name:`SkeletonBlock`,props:{width:{default:`100%`},height:{default:`14px`},radius:{default:`8px`},circle:{type:Boolean,default:!1}},setup(n){return(i,a)=>(e(),r(`span`,{class:t([`sk`,{"sk--circle":n.circle}]),style:o({width:n.width,height:n.height,borderRadius:n.circle?`50%`:n.radius}),"aria-hidden":`true`},null,6))}}),[[`__scopeId`,`data-v-eee3758f`]]),d={class:`page-skeleton__hero`},f={class:`page-skeleton__quick`},p={class:`page-skeleton__level`},m={class:`page-skeleton__level-top`},h={class:`page-skeleton__level-text`},g={class:`page-skeleton__products`},_={class:`page-skeleton__section-head`},v={class:`page-skeleton__grid page-skeleton__product-grid`},y={class:`page-skeleton__profile-hero`},b={class:`page-skeleton__panel`},x={class:`page-skeleton__list`},S={class:`page-skeleton__row-text`},C={class:`page-skeleton__detail-body`},w={class:`page-skeleton__chips`},T={class:`page-skeleton__grid`},E={key:4,class:`page-skeleton__form`},D={key:5,class:`page-skeleton__list`},O={class:`page-skeleton__row-text`},k=l(i({__name:`PageSkeleton`,props:{variant:{default:`list`},rows:{default:4}},setup(i){return(o,l)=>(e(),r(`div`,{class:t([`page-skeleton`,{"page-skeleton--home":i.variant===`home`}]),role:`status`,"aria-live":`polite`,"aria-busy":`true`,"aria-label":`در حال بارگذاری`},[i.variant===`home`?(e(),r(c,{key:0},[a(`div`,d,[n(u,{class:`page-skeleton__hero-block`,height:`148px`,radius:`16px`})]),a(`div`,f,[(e(),r(c,null,s(4,e=>a(`div`,{key:`q-${e}`,class:`page-skeleton__quick-item`},[n(u,{circle:``,width:`48px`,height:`48px`}),n(u,{width:`72%`,height:`10px`})])),64))]),a(`div`,p,[a(`div`,m,[n(u,{circle:``,width:`48px`,height:`48px`}),a(`div`,h,[n(u,{width:`56px`,height:`10px`}),n(u,{width:`88px`,height:`16px`}),n(u,{width:`104px`,height:`10px`})])]),n(u,{height:`8px`,radius:`999px`}),n(u,{width:`62%`,height:`10px`})]),a(`div`,g,[a(`div`,_,[n(u,{width:`132px`,height:`16px`}),n(u,{width:`72px`,height:`12px`})]),a(`div`,v,[(e(),r(c,null,s(6,e=>a(`div`,{key:`g-${e}`,class:`page-skeleton__card`},[n(u,{class:`page-skeleton__product-image`,height:`110px`,radius:`12px`}),n(u,{width:`82%`,height:`12px`}),n(u,{width:`54%`,height:`10px`})])),64))])])],64)):i.variant===`profile`?(e(),r(c,{key:1},[a(`div`,y,[n(u,{circle:``,width:`72px`,height:`72px`}),n(u,{width:`45%`,height:`18px`}),n(u,{width:`30%`,height:`12px`})]),a(`div`,b,[(e(),r(c,null,s(4,e=>a(`div`,{key:`s-${e}`,class:`page-skeleton__stat`},[n(u,{width:`50%`,height:`10px`}),n(u,{width:`70%`,height:`18px`})])),64))]),a(`div`,x,[(e(),r(c,null,s(5,e=>a(`div`,{key:`m-${e}`,class:`page-skeleton__row`},[n(u,{circle:``,width:`36px`,height:`36px`}),a(`div`,S,[n(u,{width:`55%`,height:`12px`}),n(u,{width:`35%`,height:`10px`})])])),64))])],64)):i.variant===`detail`?(e(),r(c,{key:2},[n(u,{height:`220px`,radius:`0`}),a(`div`,C,[n(u,{width:`70%`,height:`20px`}),n(u,{width:`40%`,height:`12px`}),n(u,{height:`72px`,radius:`12px`}),n(u,{width:`100%`,height:`12px`}),n(u,{width:`92%`,height:`12px`}),n(u,{width:`85%`,height:`12px`}),n(u,{height:`48px`,radius:`12px`})])],64)):i.variant===`grid`||i.variant===`cards`?(e(),r(c,{key:3},[n(u,{width:`55%`,height:`16px`}),a(`div`,w,[(e(),r(c,null,s(4,e=>n(u,{key:`c-${e}`,width:`72px`,height:`32px`,radius:`999px`})),64))]),a(`div`,T,[(e(!0),r(c,null,s(i.rows,t=>(e(),r(`div`,{key:`card-${t}`,class:`page-skeleton__card`},[n(u,{height:`120px`,radius:`12px`}),n(u,{width:`85%`,height:`12px`}),n(u,{width:`55%`,height:`10px`})]))),128))])],64)):i.variant===`form`?(e(),r(`div`,E,[(e(!0),r(c,null,s(i.rows,t=>(e(),r(`div`,{key:`f-${t}`,class:`page-skeleton__field`},[n(u,{width:`30%`,height:`10px`}),n(u,{height:`44px`,radius:`10px`})]))),128)),n(u,{height:`48px`,radius:`12px`})])):(e(),r(`div`,D,[(e(!0),r(c,null,s(i.rows,t=>(e(),r(`div`,{key:`r-${t}`,class:`page-skeleton__row page-skeleton__row--card`},[n(u,{circle:``,width:`40px`,height:`40px`}),a(`div`,O,[n(u,{width:`62%`,height:`13px`}),n(u,{width:`42%`,height:`10px`}),n(u,{width:`28%`,height:`10px`})])]))),128))]))],2))}}),[[`__scopeId`,`data-v-d3e1c988`]]);export{k as t}; |