index-023c54d8.js 2.8 KB

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