2 lines
1.3 KiB
JavaScript
2 lines
1.3 KiB
JavaScript
import{an as u,aA as m}from"./bootstrap-DsjPfOC_.js";import{C as d}from"./index-CVNhvefc.js";import{m as x,b9 as h,ad as t,b2 as a,j as r,u as s,aT as l,ac as g,bJ as b,I as f,bb as v,bp as i}from"../jse/index-index-CO0ZsLf2.js";const C={key:1,class:"relative"},k={key:0,class:"absolute bottom-[10px] right-[10px] rounded-xl bg-black px-[8px] py-[2px] text-[10px] text-white opacity-40"},N=x({name:"Carousel",__name:"index",props:{property:{}},setup(e){const o=h(0),p=n=>{o.value=n+1};return(n,I)=>e.property.items.length===0?(a(),t("div",{key:0,class:"flex items-center justify-center bg-gray-300",style:l({height:e.property.items.length===0?"250px":`${e.property.height}px`})},[r(s(u),{icon:"tdesign:image",class:"text-[120px] text-gray-800"})],4)):(a(),t("div",C,[r(s(d),{autoplay:e.property.autoplay,"autoplay-speed":e.property.interval*1e3,dots:e.property.indicator!=="number",onChange:p,style:l({height:`${e.property.height}px`})},{default:b(()=>[(a(!0),t(f,null,v(e.property.items,(c,y)=>(a(),t("div",{key:y},[r(s(m),{class:"h-full w-full object-cover",src:c.imgUrl,preview:!1},null,8,["src"])]))),128))]),_:1},8,["autoplay","autoplay-speed","dots","style"]),e.property.indicator==="number"?(a(),t("div",k,i(o.value)+" / "+i(e.property.items.length),1)):g("",!0)]))}});export{N as default};
|