1 |
- import{d as z,r as a,aS as b,B as L,o as l,l as j,w as P,g as m,av as p,a as o,c as i,F as U,k as C,i as g,a2 as x,W as D,t as R,aT as E,_ as I,__tla as S}from"./index-af173888.js";import{E as W,__tla as q}from"./el-image-fdde0035.js";import{__tla as F}from"./el-image-viewer-0d82b94c.js";import{b as G,__tla as H}from"./spu-41f2bf16.js";let T,O=Promise.all([(()=>{try{return S}catch{}})(),(()=>{try{return q}catch{}})(),(()=>{try{return F}catch{}})(),(()=>{try{return H}catch{}})()]).then(async()=>{let v,_;v={key:0,class:"absolute left-0 top-0 z-1 items-center justify-center"},_=z({name:"ProductList",__name:"index",props:{property:{type:Object,required:!0}},setup($){const t=$,s=a([]);b(()=>t.property.spuIds,async()=>{s.value=await G(t.property.spuIds)},{immediate:!0,deep:!0});const u=a(375),h=a(),r=a(2),c=a("100%"),d=a("0"),n=a("");return b(()=>[t.property,u,s.value.length],()=>{r.value=t.property.layoutType==="twoCol"?2:3;const e=(u.value-t.property.space*(r.value-1))/r.value;d.value=r.value===2?"64px":`${e}px`,t.property.layoutType==="horizSwiper"?(n.value=`repeat(auto-fill, ${e}px)`,c.value=e*s.value.length+t.property.space*(s.value.length-1)+"px"):(n.value=`repeat(${r.value}, auto)`,c.value="100%")},{immediate:!0,deep:!0}),L(()=>{var e,y;u.value=((y=(e=h.value)==null?void 0:e.wrapRef)==null?void 0:y.offsetWidth)||375}),(e,y)=>{const w=W,k=E;return l(),j(k,{class:"z-1 min-h-30px","wrap-class":"w-full",ref_key:"containerRef",ref:h},{default:P(()=>[m("div",{class:"grid overflow-x-auto",style:p({gridGap:`${e.property.space}px`,gridTemplateColumns:o(n),width:o(c)})},[(l(!0),i(U,null,C(o(s),(f,B)=>(l(),i("div",{class:"relative box-content flex flex-row flex-wrap overflow-hidden bg-white",style:p({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(),i("div",v,[g(w,{fit:"cover",src:e.property.badge.imgUrl,class:"h-26px w-38px"},null,8,["src"])])):x("",!0),g(w,{fit:"cover",src:f.picUrl,style:p({width:o(d),height:o(d)})},null,8,["src","style"]),m("div",{class:D(["flex flex-col gap-8px p-8px box-border",{"w-[calc(100%-64px)]":o(r)===2,"w-full":o(r)===3}])},[e.property.fields.name.show?(l(),i("div",{key:0,class:"truncate text-12px",style:p({color:e.property.fields.name.color})},R(f.name),5)):x("",!0),m("div",null,[e.property.fields.price.show?(l(),i("span",{key:0,class:"text-12px",style:p({color:e.property.fields.price.color})}," \uFFE5"+R(f.price),5)):x("",!0)])],2)],4))),128))],4)]),_:1},512)}}}),T=I(_,[["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/components/DiyEditor/components/mobile/ProductList/index.vue"]])});export{O as __tla,T as default};
|