index-a487d6e7.js 1.3 KB

1
  1. import{d as m,r as x,o as a,c as r,f as e,B as s,F as g,P as f,A as h,D as o,a as v,E as b,_ as k}from"./index-b9299550.js";import{E as _,a as w}from"./el-carousel-item-101ab0da.js";import{E}from"./el-image-92ea5aa4.js";import"./el-image-viewer-498779d9.js";const j={key:0,class:"h-250px flex items-center justify-center bg-gray-3"},C={key:1,class:"relative"},A={key:0,class:"absolute bottom-10px right-10px rounded-xl bg-black p-x-8px p-y-2px text-10px text-white opacity-40"},B=m({name:"Carousel",__name:"index",props:{property:{}},setup(D){const p=x(0),i=t=>{p.value=t+1};return(t,F)=>{const l=k,n=E,y=_,c=w;return t.property.items.length===0?(a(),r("div",j,[e(l,{icon:"tdesign:image",class:"text-gray-8 text-120px!"})])):(a(),r("div",C,[e(c,{height:"174px",type:t.property.type==="card"?"card":"",autoplay:t.property.autoplay,interval:1e3*t.property.interval,"indicator-position":t.property.indicator==="number"?"none":void 0,onChange:i},{default:s(()=>[(a(!0),r(g,null,f(t.property.items,(u,d)=>(a(),h(y,{key:d},{default:s(()=>[e(n,{class:"h-full w-full",src:u.imgUrl},null,8,["src"])]),_:2},1024))),128))]),_:1},8,["type","autoplay","interval","indicator-position"]),t.property.indicator==="number"?(a(),r("div",A,o(v(p))+" / "+o(t.property.items.length),1)):b("",!0)]))}}});export{B as default};