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