acdr-ui/dist/build/mp-weixin/modules/mall/sheep/components/s-goods-item/s-goods-item.js

2 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-10-01 09:15:35 +08:00
"use strict";const e=require("../../../../../common/vendor.js"),t=require("../../index.js"),r=require("../../hooks/useGoods.js"),i={__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(i){const u=i,o=e.computed((()=>u.skuText?"object"==typeof u.skuText?u.skuText.join(","):u.skuText:""));return(u,n)=>e.e({a:e.unref(t.sheep).$url.cdn(i.img),b:i.title},i.title?{c:e.t(i.title)}:{},{d:o.value},o.value?{e:e.t(o.value)}:{},{f:i.price&&Number(i.price)>0},i.price&&Number(i.price)>0?{g:e.t(e.unref(r.fen2yuan)(i.price)),h:e.s({color:i.priceColor})}:{},{i:i.num},i.num?{j:e.t(i.num)}:{},{k:e.s({width:i.titleWidth?i.titleWidth+"rpx":""}),l:e.s({borderRadius:i.radius+"rpx",marginBottom:i.marginBottom+"rpx"})})}},u=e._export_sfc(i,[["__scopeId","data-v-b6c1e127"]]);wx.createComponent(u);