Card 商品卡片

参考 NutUI 业务卡片能力,支持价格、商品信息、店铺信息与具名插槽自定义

商品卡片,支持图片、价格、店铺信息与自定义插槽

演示

9:41

代码示例

<!-- 基础用法 -->
  <re-card class="demo-card demo-card-basic" :img-url="goodsImage" title="2026新款轻盈跑鞋" :price="299" :vip-price="399" shop-desc="限时满300减40" delivery="次日达" shop-name="Reglow 运动旗舰店" />

<!-- 自定义商品介绍 -->
  <re-card class="demo-card demo-card-prolist" :img-url="goodsImage" title="云感针织休闲鞋" :price="199" :vip-price="259" shop-desc="店铺券可叠加" delivery="包邮" shop-name="Reglow 鞋服馆" > <template #prolist> <view class="demo-prolist"> <text class="demo-prolist__item">透气织面</text> <text class="demo-prolist__dot">|</text> <text class="demo-prolist__item">防滑大底</text> <text class="demo-prolist__dot">|</text> <text class="demo-prolist__item">轻量回弹</text> </view> </template> </re-card>

<!-- 价格后自定义内容 -->
  <re-card class="demo-card demo-card-price" :img-url="goodsImage" title="城市轻户外冲锋衣" :price="459" shop-desc="首单立减20" delivery="门店自提" shop-name="Reglow Urban" > <template #price> <view class="demo-price-wrap"> <text class="demo-price-wrap__prefix">到手价</text> <text class="demo-price-wrap__value">¥459</text> </view> </template> <template #origin> <view class="demo-origin-wrap"> <text class="demo-origin-wrap__text">券后返30积分</text> </view> </template> </re-card>

<!-- 自定义店铺介绍 -->
  <re-card class="demo-card demo-card-shop-tag" :img-url="goodsImage" title="通勤双肩电脑包" :price="169" :vip-price="229" shop-name="Reglow 箱包旗舰店" footer-text="月销 2.3w+" > <template #shopTag> <view class="demo-tags"> <view class="demo-tags__item demo-tags__item--danger"> <text class="demo-tags__text demo-tags__text--danger">官方补贴</text> </view> <view class="demo-tags__item demo-tags__item--plain"> <text class="demo-tags__text demo-tags__text--plain">7天无忧退</text> </view> <view class="demo-tags__item demo-tags__item--gold"> <text class="demo-tags__text demo-tags__text--gold">新品</text> </view> </view> </template> <template #footer> <view class="demo-footer-action"> <text class="demo-footer-action__text">看相似</text> </view> </template> </re-card>

引入

推荐使用 easycom 模式,配置后无需手动 import 即可直接使用 <re-card />。

API

Card Props

名称类型默认值描述必传
titlestring''标题N
pricestring | number''-N
imagestring''-N
descriptionstring''-N
tagstring''-N
shopNamestring''-N
footerTextstring''-N
imgUrlstring''-N
vipPricestring | number''-N
shopDescstring''-N
deliverystring''-N
isNeedPricebooleantrue-N
customStylestring''自定义样式N

Card Events

名称参数描述
click-点击时触发

Card Slots

名称描述
prolist-
price-
origin-
shopTag-
shopName-
default默认插槽
footer-