s-goods-item.f5d79fd7.js 2.4 KB

1
  1. import{c as t,e as s,f as e,w as l,j as o,Q as a,y as r,u as i,s as u,p as c,t as d,g as p,i as f,q as n}from"./index-9880b451.js";import{f as m}from"./useGoods.bdd1c2ea.js";/* empty css */import{_}from"./_plugin-vue_export-helper.1b428a4d.js";const x=_({__name:"s-goods-item",props:{img:{type:String,default:"https://img1.baidu.com/it/u=1601695551,235775011&fm=26&fmt=auto"},title:{type:String,default:""},titleWidth:{type:Number,default:0},skuText:{type:[String,Array],default:""},price:{type:[String,Number],default:""},priceColor:{type:[String],default:""},num:{type:[String,Number],default:0},score:{type:[String,Number],default:""},radius:{type:[String],default:""},marginBottom:{type:[String],default:""}},setup(_){const x=_,g=t((()=>x.skuText?"object"==typeof x.skuText?x.skuText.join(","):x.skuText:""));return(t,x)=>{const y=f,b=n;return s(),e(y,null,{default:l((()=>[o(y,null,{default:l((()=>[a(t.$slots,"top",{},void 0,!0)])),_:3}),o(y,{class:"ss-order-card-warp ss-flex ss-col-stretch ss-row-between bg-white",style:r([{borderRadius:_.radius+"rpx",marginBottom:_.marginBottom+"rpx"}])},{default:l((()=>[o(y,{class:"img-box ss-m-r-24"},{default:l((()=>[o(b,{class:"order-img",src:i(u).$url.cdn(_.img),mode:"aspectFill"},null,8,["src"])])),_:1}),o(y,{class:"box-right ss-flex-col ss-row-between",style:r([{width:_.titleWidth?_.titleWidth+"rpx":""}])},{default:l((()=>[_.title?(s(),e(y,{key:0,class:"title-text ss-line-2"},{default:l((()=>[c(d(_.title),1)])),_:1})):p("",!0),i(g)?(s(),e(y,{key:1,class:"spec-text ss-m-t-8 ss-m-b-12"},{default:l((()=>[c(d(i(g)),1)])),_:1})):p("",!0),o(y,{class:"groupon-box"},{default:l((()=>[a(t.$slots,"groupon",{},void 0,!0)])),_:3}),o(y,{class:"ss-flex"},{default:l((()=>[o(y,{class:"ss-flex ss-col-center"},{default:l((()=>[_.price&&Number(_.price)>0?(s(),e(y,{key:0,class:"price-text ss-flex ss-col-center",style:r([{color:_.priceColor}])},{default:l((()=>[c(" ¥"+d(i(m)(_.price)),1)])),_:1},8,["style"])):p("",!0),_.num?(s(),e(y,{key:1,class:"total-text ss-flex ss-col-center"},{default:l((()=>[c("x "+d(_.num),1)])),_:1})):p("",!0),a(t.$slots,"priceSuffix",{},void 0,!0)])),_:3})])),_:3}),o(y,{class:"tool-box"},{default:l((()=>[a(t.$slots,"tool",{},void 0,!0)])),_:3}),o(y,null,{default:l((()=>[a(t.$slots,"rightBottom",{},void 0,!0)])),_:3})])),_:3},8,["style"])])),_:3},8,["style"])])),_:3})}}},[["__scopeId","data-v-8cac45ca"]]);export{x as _};