@rancheer/goods-card
v1.0.3
Published
该组件已废弃,无法使用
Downloads
10
Readme
该组件已废弃,无法使用
1)配置属性
| props属性 | 类型 | 默认值|是否必传 | ---- | ---- | ---- | ---- | | goodsData 商品数据 | Object | {} | 是 | |transfer 字段适配(商品的字段不一致)| String | normal只有必须的商品名称、价格、规格 normal/search/tuangou/favorite | 否 | | shape 外层大小 | String | middle mini/middle/big/super | 否 | direction 展示方向 | String | vertical vertical/column | 否 | | className 自定义样式 | String | '' | 否 | | otherPrice 显示当前价格的额外价格 | String | “” pt 拼团价格/yj 原价 | 否 | |showSku 显示商品规格 | Boolean | true | 否 | |showSubTitle 显示副标题 | Boolean | false | 否 | |showAnglerTag 左上角角标| Boolean| true| 否| |showActivityTag 活动标签| Boolean| true | 否| |showShopName 店铺名称| Boolean |true|否| |showSaleCount 显示销量 | Boolean|false|否| |preview 商品预览| Boolean |false|否| |showPtButton 显示拼团按钮| Boolean|false|否| |showAddCart 显示加入购物车按钮 |Boolean|true|否| |slotImage 商品主图插槽 | Boolean | false | 否 | | slotTitle 商品标题/副标题插槽 | Boolean | false | 否 | | slotGoods 商品规格、价格、店铺插槽 | Boolean | false | 否 | |slotBottom 商品底部/右边拓展插槽 | Boolean | false | 否 |
2)回调方法 | 方法名称 | 描述| 是否必传 | | ---- | ---- | ----| |bindPtHandle | 当显示拼团按钮时可用 返回商品对象 | 否 | |bindAddCartHandle | 当显示购物车按钮时可用 返回商品对象 | 否 | |bindDeatailHandle | 点击商品的回调方法 返回商品对象 | 否 | |bindReadyhandle | 商品数据加载完成时的回调 返回 callback| 否| | 实验性bindErrorHandle | 商品数据加载异常时的回调 返回 error对象| 否 | 3)自定义内容显示 | 插槽名称 | 作用部位| 描述 | | ---- | ---- | ----| | | 商品主图 | 替换当前商品组件的主图显示部位 | | | 商品标题/副标题 | 替换当前的商品标题与副标题部位 | | | 商品规格、价格、店铺 | 替换当前的商品规格、价格、店铺部位 | ||在商品底部/右边拓展| 拓展底部/右边|