1.1.0 • Published 4 months ago

vue-zxy-comment-plugins-sample v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

miniproject

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Lints and fixes files

npm run lint

how to use

main.js

import vueZxyCommentPluginsSample from 'vue-zxy-comment-plugins-sample'
Vue.use(vueZxyCommentPluginsSample);

.vue文件里
<z-z-comment :getAllPerson="AllPerson" :key-map="keyMap"
                 :showNumber="2"
                 :comment-datas="commentDatas"
                 :orderBy="'create_time'"
                 :useEmoji="true"
                 @submitComment="submitComment"/>
                 

 title	            String  标题		默认为热门评论                
 showNumber:	    Number 展示数量		默认为2,超出的需展开查看
 keyMap:          {pid: "parent_comment_id",id: "id",isAdmin: "admin_comment"}//可根据自己实际key值设置

submitComment:     function 发布评论回调函数     
AllPerson:          function 属性方法,传入需要@的人员 回调函数 
rank:              string 排序方式 asc升序   desc降序   默认为desc
orderBy:           String  排序字段(时间)		默认为time
useEmoji:          Boolean	是否使用表情		默认为true
withCommentContent:Boolean	是否有评论框		默认为true
commentDatas:      array 后端返回的评论数据 
案例:   commentDatas: [
              {
                id: 1, //评论Id
                admin_comment: 0,//楼主标记   1为楼主 
                avatar: "https://img2.baidu.com/it/u=134769530,4268043097&fm=253&fmt=auto&app=138&f=JPEG?w=533&h=333",//头像
                create_time: "2020-05-31 23:03:55",//创建时间
                nickname: "nickname1",//昵称
                parent_comment_id: null,//父级评论id
                content: "我是评论1",//评论内容
                seleUserInfo:[//@人员信息
                  {userId:102,userLink:"http://www.baidu.com",userName:"王五"},
                ]
              },  
              

Customize configuration

See Configuration Reference.

1.1.0

4 months ago

1.0.1

4 months ago

1.0.0

4 months ago

0.1.0

4 months ago