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