Skip to content

commodity-list 商品列表

commodity-list 用于展示商品列表,支持双列布局,集成骨架屏和空状态。

基础用法

vue
<template>
  <commodity-list :list="proList" :showSkeleton="loading"></commodity-list>
</template>

<script>
export default {
  data() {
    return {
      loading: true,
      proList: []
    }
  }
}
</script>

Props

参数说明类型默认值
list商品数据列表Array[]
direction排列方向 (column)String'column'
showSoldOut是否显示售罄遮罩Booleanfalse
showTeJiaTag是否显示特价标签Booleanfalse
showSkeleton是否显示骨架屏Booleanfalse
showEmpty是否显示空状态Booleanfalse
priceColor价格文字颜色String''

Events

事件名说明回调参数
goPage点击商品卡片触发item (商品对象)
showPopupFn点击购物车图标触发item (商品对象)

Slots

插槽名说明
bottom自定义商品底部内容 (价格/购物车区域)