0.2.3 • Published 4 years ago

zdsg-ui v0.2.3

Weekly downloads
76
License
MIT
Repository
-
Last release
4 years ago

zdsg-ui

博客评论相关UI

安装

npm install zdsg-ui -S

使用

main.js

import zdsgUi from 'zdsg-ui'
import 'zdsg-ui/lib/zdsg-ui.css'

Vue.use(zdsgUi)

组件使用

<zdsg-comment-rich ref="commentRich" placeholder="请留下你的治国方针..." :showLike="true" :showAddTime="true" @submit="submit">
</zdsg-comment-rich>

<zdsg-comment v-for="item in transCommentList" :key="item.commentId" :userName="item.userName" :commentData="item" @callbackComment="callbackComment" @submit="commentSubmit" @addLike="commentAddLike">
</zdsg-comment>

特点

树形结构评论
评论输入框支持输入表情包,文字

参数

commentRich (评论输入组件)

参数说明类型默认值
showLike是否展示点赞按钮Booleanfalse
showAddTime是否展示打卡按钮Booleanfalse
placeholderplaceholder内容String请输入评论内容

comment (评论模块(树形结构数据))

参数说明类型默认值
commentData评论数据(数据格式详情见下表)Object{}
userName用户名String-

comment组件commentData数据格式说明

参数说明类型
userPhoto用户头像String
userName用户名String
commentId评论idNumber
parentCommentId父评论idNumber
commentLikeCount点赞数Number
commentContent评论内容String
commentDate评论时间String
showInput显示输入框标志位Boolean
children子数据(数据格式同commentData)Array

事件

commentRich (评论输入组件)

事件名称说明回调参数
submit提交按钮string(文本内容)

comment (评论模块)

事件名称说明回调参数
submit提交按钮Object(commentData组件绑定数据,content评论内容)
addLike点赞按钮Object(组件绑定数据)
callbackComment回复按钮Object(组件绑定数据)
0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.9

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago