import{t,x as e,o as a,j as s,w as o,h as l,y as i,i as d,m as u,I as r,l as p,a0 as n,B as c,u as f}from"./index-90c12cc1.js";import{L as g}from"./index.d156dd8a.js";import{d as m}from"./utils.80a0ac72.js";import{_ as y}from"./_plugin-vue_export-helper.1b428a4d.js";const _="NEW",h=y({__name:"Goods",props:{goods:{type:Object,default:()=>({})},imgWidth:{type:String,default:"100%"},ratio:{type:[String,Boolean],default:()=>"1/1"},infoPadding:{type:String,default:()=>"0 0"},titleWrap:{type:Boolean,default:()=>!1},titleSize:{type:Number,default:()=>28},type:{type:String,default:()=>_},row:{type:Boolean,default:!1},jump:{type:Boolean,default:!0}},setup(y){const _=y,{goods:h,imgWidth:w,ratio:j,infoPadding:v,titleWrap:x,titleSize:S,row:W,jump:B}=t(_),{push:k}=f(),I=e((()=>""+1/m(1,1.3)));function $(){B.value&&k({url:"/pages/goodsDetail/goodsDetail"},{data:{id:h.value.id,skuId:h.value.skuId}})}return(t,e)=>{const f=c;return a(),s(f,{class:u({goods:!0,row:d(W)}),onClick:$},{default:o((()=>[l(f,{class:"goods-image",style:i({width:d(w),"aspect-ratio":!0===d(j)?d(I):d(j)})},{default:o((()=>[l(g,{unique:d(h).id,src:d(h).image,class:"image",mode:!0===d(j)?"aspectFit":"aspectFill"},null,8,["unique","src","mode"])])),_:1},8,["style"]),l(f,{class:"goods-info",style:i({padding:d(v),width:d(W)?`calc( 100% - ${d(w)} )`:"100%",height:d(W)?`${d(w)}`:"auto"})},{default:o((()=>[l(f,{class:u({"title-row":!0,nowrap:!d(x)}),style:i({"font-size":`${d(S)}rpx`})},{default:o((()=>[r(p(d(h).storeName),1)])),_:1},8,["class","style"]),l(f,{class:"",style:{width:"100%"}},{default:o((()=>[n(t.$slots,"options",{goods:d(h)},void 0,!0)])),_:3})])),_:3},8,["style"])])),_:3},8,["class"])}}},[["__scopeId","data-v-0b4acd91"]]);export{h as G};
