import{l as t,o as s,c as e,w as a,a as o,A as i,u as l,n as d,h as r,t as p,j as n,i as u,d as g}from"./index-3714412c.js";import{u as c}from"./useRouter.f44141c1.js";import{_ as f}from"./_plugin-vue_export-helper.1b428a4d.js";const m="NEW",y=f({__name:"Goods",props:{goods:{type:Object,default:()=>({})},imgWidth:{type:String,default:"100%"},ratio:{type:String,default:()=>"1/1"},infoPadding:{type:String,default:()=>"0 0"},titleNowrap:{type:Boolean,default:()=>!0},titleSize:{type:Number,default:()=>28},type:{type:String,default:()=>m},row:{type:Boolean,default:!1}},setup(f){const m=f,{goods:y,imgWidth:_,ratio:w,infoPadding:h,titleNowrap:S,titleSize:j,row:N}=t(m),{push:v}=c();function x(){v({url:"/pages/goodsDetail/goodsDetail"},{data:{id:y.value.id}})}return(t,c)=>{const f=u,m=g;return s(),e(m,{class:d({goods:!0,row:l(N)}),onClick:x},{default:a((()=>[o(m,{class:"goods-image",style:i({width:l(_),"aspect-ratio":l(w)})},{default:a((()=>[o(f,{src:l(y).image,class:"image",mode:"aspectFill"},null,8,["src"])])),_:1},8,["style"]),o(m,{class:"goods-info",style:i({padding:l(h),width:l(N)?`calc( 100% - ${l(_)} )`:"100%",height:l(N)?`${l(_)}`:"auto"})},{default:a((()=>[o(m,{class:d({"title-row":!0,nowrap:l(S)}),style:i({"font-size":`${l(j)}rpx`})},{default:a((()=>[r(p(l(y).storeName),1)])),_:1},8,["class","style"]),n(t.$slots,"options",{goods:l(y)},void 0,!0)])),_:3},8,["style"])])),_:3},8,["class"])}}},[["__scopeId","data-v-276cd591"]]);export{y as G};
