0.0.20 • Published 3 years ago
商品评论卡片
引入
"usingComponents": {
"comments-card": "@retailwe/comments-card/index"
}
代码演示
<wr-comments-card
commentScore="{{item.commentScore}}"
userName="{{item.userName}}"
commentImageUrls="{{item.commentImageUrls}}"
commentContent="{{item.commentContent}}"
commentTime="{{item.commentTime}}"
userHeadUrl="{{item.userHeadUrl}}"
></wr-comments-card>
入参
参数 | 说明 | 类型 | 默认值 | 是否必要 |
---|
commentScore | 评分 | Array | [] | 是 |
userName | 发表人名称 | String | '' | 否 |
commentImageUrls | 评论图片 | Array | [] | 否 |
commentContent | 评论内容 | String | ‘’ | 否 |
commentTime | 评论时间 | string | '' | 否 |
userHeadUrl | 发表人头像地址 | String | | 否 |
hideWordCount | 多少字符隐藏 | Number | 240 | 否 |
autoPreview | 是否开启相册默认展示缩略图 | Boolean | 否 | 是 |
slot
Events
事件 | 是否必要 | 说明 |
---|
showPreview | 否 | 点击缩略图时返回该图所在评论图组中的索引index |
外部样式类