1.0.19 • Published 7 years ago
miniprogram-comment v1.0.19
miniprogram-custom-comment
小程序自定义组件-评论模块:
- 简单的小程序评论组件
 - 代码结构有待优化
 
属性
| 属性名称 | 类型 | 默认 | 必填 | 说明 | 
|---|---|---|---|---|
| commentData | Object | 否 | 评论数据 | |
| bottom | Int | 0 | 是 | 设置距离底部高度 | 
| bindAuthComment | ElementPosition | 是 | 绑定输入法提交事件 | |
| bindAuthCommentButton | ElementPosition | 是 | 绑定按钮提交事件 | |
| bindClearComment | ElementPosition | 是 | 清空输入框 | 
commentData 属性
| 属性名称 | 类型 | 默认 | 必填 | 说明 | 
|---|---|---|---|---|
| title | String | 否 | 评论区标题 | |
| placeholder | String | 是 | 输入框默认值 | |
| commentText | String | 是 | 按钮文本 | |
| commentArr | Array | 否 | 评论列表 | 
commentArr 属性
| 属性名称 | 类型 | 默认 | 必填 | 说明 | 
|---|---|---|---|---|
| nickName | String | 是 | 用户昵称 | |
| name | String | 否 | 当不为空时会标注(企业微信),用来区分微信普通用户和企业用户 | |
| avatarUrl | String | /images/user.png | 否 | 头像地址 | 
| content | String | 是 | 内容不能少于6个字 | |
| lastTime | String | 是 | 发布时间 | 
使用方法
- 安装依赖:
 
npm i miniprogram-custom-comment- page.json 中添加配置
 
{
  "usingComponents": {
    "comment": "miniprogram-custom-comment"
  }
}- page.wxml 中添加组件
 
<comment placeholder="" comment-data="[]" bottom="0" bindAuthComment="{{事件}}" bindAuthCommentButton="{{事件}}" bindClearComment="{{事件}}"></comment>反馈建议
E-mail: admin@qzwu.com
@ License
1.0.19
7 years ago
1.0.18
7 years ago
1.0.17
7 years ago
1.0.16
7 years ago
1.0.15
7 years ago
1.0.14
7 years ago
1.0.13
7 years ago
1.0.12
7 years ago
1.0.11
7 years ago
1.0.10
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago