1 |
- import{d as B,r as a,M as b,l as L,o as l,x as j,w as P,h as x,az as s,a as o,c as i,F as C,v as D,g,Q as m,a0 as E,t as R,b7 as I,_ as U,__tla as q}from"./index-52b99925.js";import{E as F,__tla as G}from"./el-image-9d9dde0a.js";import{__tla as M}from"./el-image-viewer-8d62bae1.js";import{c as O,__tla as Q}from"./spu-1f519991.js";let $,S=Promise.all([(()=>{try{return q}catch{}})(),(()=>{try{return G}catch{}})(),(()=>{try{return M}catch{}})(),(()=>{try{return Q}catch{}})()]).then(async()=>{let v,_;v={key:0,class:"absolute left-0 top-0 z-1 items-center justify-center"},_=B({name:"ProductList",__name:"index",props:{property:{type:Object,required:!0}},setup(T){const t=T,p=a([]);b(()=>t.property.spuIds,async()=>{p.value=await O(t.property.spuIds)},{immediate:!0,deep:!0});const c=a(375),h=a(),r=a(2),u=a("100%"),d=a("0"),n=a("");return b(()=>[t.property,c,p.value.length],()=>{r.value=t.property.layoutType==="twoCol"?2:3;const e=(c.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)`,u.value=e*p.value.length+t.property.space*(p.value.length-1)+"px"):(n.value=`repeat(${r.value}, auto)`,u.value="100%")},{immediate:!0,deep:!0}),L(()=>{var e,y;c.value=((y=(e=h.value)==null?void 0:e.wrapRef)==null?void 0:y.offsetWidth)||375}),(e,y)=>{const w=F,z=I;return l(),j(z,{class:"z-1 min-h-30px","wrap-class":"w-full",ref_key:"containerRef",ref:h},{default:P(()=>[x("div",{class:"grid overflow-x-auto",style:s({gridGap:`${e.property.space}px`,gridTemplateColumns:o(n),width:o(u)})},[(l(!0),i(C,null,D(o(p),(f,k)=>(l(),i("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:k},[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"])])):m("",!0),g(w,{fit:"cover",src:f.picUrl,style:s({width:o(d),height:o(d)})},null,8,["src","style"]),x("div",{class:E(["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:s({color:e.property.fields.name.color})},R(f.name),5)):m("",!0),x("div",null,[e.property.fields.price.show?(l(),i("span",{key:0,class:"text-12px",style:s({color:e.property.fields.price.color})}," \uFFE5"+R(f.price),5)):m("",!0)])],2)],4))),128))],4)]),_:1},512)}}}),$=U(_,[["__file","D:/zx/mall-newfeifan-zx-admin/src/components/DiyEditor/components/mobile/ProductList/index.vue"]])});export{S as __tla,$ as default};
|