Appearance
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 | 是否显示售罄遮罩 | Boolean | false |
| showTeJiaTag | 是否显示特价标签 | Boolean | false |
| showSkeleton | 是否显示骨架屏 | Boolean | false |
| showEmpty | 是否显示空状态 | Boolean | false |
| priceColor | 价格文字颜色 | String | '' |
Events
| 事件名 | 说明 | 回调参数 |
|---|---|---|
| goPage | 点击商品卡片触发 | item (商品对象) |
| showPopupFn | 点击购物车图标触发 | item (商品对象) |
Slots
| 插槽名 | 说明 |
|---|---|
| bottom | 自定义商品底部内容 (价格/购物车区域) |