npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hbl-comment

v1.2.3

Published

评论回复组件

Downloads

67

Readme

Vue含表情评论回复组件

一、评论回复组件效果

使用vue开发一款精美实用的评论回复组件,并包含emoji表情包,整体效果如下

文本框获取焦点时弹出Emoji表情按钮、发送和取消按钮,如下图

点击Emoji表情即可弹出表情包,如下图

二、使用

1、使用下面命令下载hbl-comment组件

npm i hbl-comment

2、下载完成之后在项目中引入

import comment from 'hbl-comment'
components:{
  comment
},

3、使用

 <comment></comment>

4、如果没有下载element-ui的使用下面命令进行下载

npm i element-ui -S

5、下载完成后在main.js中引入

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI);

三、属性及事件

1、props属性

| 名称 | 类型 | 说明 | 默认值 | | -------- | -------- | -------- | -------- | | avatar |String | 头像 | 空 | placeholder | String | 文本框提示内容 | 在此输入评论内容... | minRows | Number | 文本框最小行数 | 4 | maxRows | Number | 文本框最大行数 | 8 | commentNum | Number | 评论条数 | 2 | authorId | Number | 当前登录用户id | 1 | label | String | 标签名 | 作者 | commentWidth | String | 文本框宽度 | 80% | commentList | Array | 评论列表 | 包含内容较多,此处略

评论列表commentList 包含多个评论comment,关于comment相关字段如下:

2、comment包含字段

| 名称 | 类型 | 说明 | | -------- | -------- | -------- | | id |Number | 评论id | | commentUser | Object | 评论用户 | | targetUser | Object | 被评论用户 | | content | String | 评论内容 | | createDate | String | 评论时间 | | childrenList | Array | 子评论列表 |

3、用户包含字段

| 名称 | 类型 | 说明 | | -------- | -------- | -------- | | id |Number | 用户id | | nickName | String | 用户昵称 | | avatar | String | 用户头像 |

4、事件Events

| 名称 | 说明 | 参数 | -------- | -------- | -------- | doSend | 初始文本框发送事件 | 评论内容 | doChidSend | 评论列表中文本框发送事件 | 评论内容,被评论用户id,父级评论id