index-ace244a3.js 1.7 KB

1
  1. import{d as T,r as a,M as U,o as t,j as x,w as g,c as r,F as v,A as m,a as s,k as w,av as c,Z as $,t as b,l as d}from"./index-03f5d926.js";import{E as z,a as A}from"./el-carousel-item-b6827910.js";import{E as F}from"./el-image-1846a819.js";import"./el-image-viewer-bc024f43.js";const H={class:"flex flex-row flex-wrap"},S=T({name:"MenuSwiper",__name:"index",props:{property:{}},setup(k){const l=k,p=a([]),y=a(0),i=a(0),h=a("");return U(()=>l.property,()=>{h.value=1/l.property.column*100+"%",i.value=32+(l.property.layout==="iconText"?62:42),y.value=l.property.row*i.value;const n=l.property.row*l.property.column;p.value=[];let o=[];for(const u of l.property.list)o.length===n&&(o=[]),o.length===0&&p.value.push(o),o.push(u)},{immediate:!0,deep:!0}),(n,o)=>{const u=F,C=z,_=A;return t(),x(_,{height:`${s(y)}px`,autoplay:!1,arrow:"hover","indicator-position":"outside"},{default:g(()=>[(t(!0),r(v,null,m(s(p),(j,E)=>(t(),x(C,{key:E},{default:g(()=>[w("div",H,[(t(!0),r(v,null,m(j,(e,M)=>{var f;return t(),r("div",{key:M,class:"relative flex flex-col items-center justify-center",style:c({width:s(h),height:`${s(i)}px`})},[w("div",{class:$(["relative","h-42px w-42px"])},[(f=e.badge)!=null&&f.show?(t(),r("span",{key:0,class:"absolute right--10px top--10px z-1 h-20px rounded-10px p-x-6px text-center text-12px leading-20px",style:c({color:e.badge.textColor,backgroundColor:e.badge.bgColor})},b(e.badge.text),5)):d("",!0),e.iconUrl?(t(),x(u,{key:1,src:e.iconUrl,class:"h-full w-full"},null,8,["src"])):d("",!0)],2),n.property.layout==="iconText"?(t(),r("span",{key:0,class:"text-12px",style:c({color:e.titleColor,height:"20px",lineHeight:"20px"})},b(e.title),5)):d("",!0)],4)}),128))])]),_:2},1024))),128))]),_:1},8,["height"])}}});export{S as default};