index-18f6d738.js 2.8 KB

1
  1. import{d as I,r,w,b as j,o as l,C as z,A as C,B as y,aH as s,a,c as p,F as E,R as P,f as g,a3 as f,ad as D,E as R,b0 as L,_ as S,__tla as U}from"./index-286756b9.js";import{E as q,__tla as A}from"./el-image-73c105b7.js";import{__tla as F}from"./el-image-viewer-e0e5d3be.js";import{g as G,__tla as H}from"./spu-c6e01563.js";import{g as O,__tla as W}from"./seckillActivity-3793ba32.js";let k,J=Promise.all([(()=>{try{return U}catch{}})(),(()=>{try{return A}catch{}})(),(()=>{try{return F}catch{}})(),(()=>{try{return H}catch{}})(),(()=>{try{return W}catch{}})()]).then(async()=>{let m,_;m={key:0,class:"absolute left-0 top-0 z-1 items-center justify-center"},_=I({name:"PromotionSeckill",__name:"index",props:{property:{type:Object,required:!0}},setup($){const o=$,i=r([]);w(()=>o.property.activityId,async()=>{if(!o.property.activityId)return;const e=await O(o.property.activityId);e!=null&&e.spuId&&(i.value=[await G(e.spuId)])},{immediate:!0,deep:!0});const c=r(375),x=r(),t=r(2),v=r("100%"),d=r("0"),h=r("");return w(()=>[o.property,c,i.value.length],()=>{t.value=o.property.layoutType==="oneCol"?1:3;const e=(c.value-o.property.space*(t.value-1))/t.value;d.value=t.value===2?"64px":`${e}px`,h.value=`repeat(${t.value}, auto)`,v.value="100%"},{immediate:!0,deep:!0}),j(()=>{var e,n;c.value=((n=(e=x.value)==null?void 0:e.wrapRef)==null?void 0:n.offsetWidth)||375}),(e,n)=>{const b=q,T=L;return l(),z(T,{class:"z-1 min-h-30px","wrap-class":"w-full",ref_key:"containerRef",ref:x},{default:C(()=>[y("div",{class:"grid overflow-x-auto",style:s({gridGap:`${e.property.space}px`,gridTemplateColumns:a(h),width:a(v)})},[(l(!0),p(E,null,P(a(i),(u,B)=>(l(),p("div",{class:"relative box-content flex flex-row flex-wrap overflow-hidden bg-white",style:s({borderTopLeftRadius:`${e.property.borderRadiusTop}px`,borderTopRightRadius:`${e.property.borderRadiusTop}px`,borderBottomLeftRadius:`${e.property.borderRadiusBottom}px`,borderBottomRightRadius:`${e.property.borderRadiusBottom}px`}),key:B},[e.property.badge.show?(l(),p("div",m,[g(b,{fit:"cover",src:e.property.badge.imgUrl,class:"h-26px w-38px"},null,8,["src"])])):f("",!0),g(b,{fit:"cover",src:u.picUrl,style:s({width:a(d),height:a(d)})},null,8,["src","style"]),y("div",{class:D(["flex flex-col gap-8px p-8px box-border",{"w-[calc(100%-64px)]":a(t)===2,"w-full":a(t)===3}])},[e.property.fields.name.show?(l(),p("div",{key:0,class:"truncate text-12px",style:s({color:e.property.fields.name.color})},R(u.name),5)):f("",!0),y("div",null,[e.property.fields.price.show?(l(),p("span",{key:0,class:"text-12px",style:s({color:e.property.fields.price.color})}," \uFFE5"+R(u.price),5)):f("",!0)])],2)],4))),128))],4)]),_:1},512)}}}),k=S(_,[["__file","D:/zx/mall-newfeifan-zx-admin/src/components/DiyEditor/components/mobile/PromotionSeckill/index.vue"]])});export{J as __tla,k as default};