ThComment评论

2022/4/15 vue

# ThComment评论

对网站内容的反馈、评价和讨论。

# 依赖说明

# 效果预览

img

# 基本使用

<template>
  <div>
    <th-comment>
      <template #actions>
        <span></span>
      </template>

      <template #author>
        张三
      </template>

      <template #avatar>
        <el-avatar icon="el-icon-user-solid" />
      </template>

      <template #content>
        <p>文章很棒,好评.</p>
      </template>

      <template #datetime>
        2022-08-08 08:08:08
      </template>
    </th-comment>

    <th-comment
        :actions="['标注']"
        author="李四"
        avatar="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
        content="好的评价不仅仅字数少,点赞也很高"
        datetime="2022-08-08 08:08:08"
    />

    <th-comment author="李四" avatar="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" datetime="2022-08-08 08:08:08">
      <template #content>
        <el-input type="textarea" :rows="5" placeholder="请输入评价内容" />
      </template>
      <template #actions>
        <el-button type="primary" size="mini">提交</el-button>
        <el-button type="warning" size="mini">重置</el-button>
      </template>
    </th-comment>
  </div>
</template>

<script>
export default {
}
</script>

# Attributes

参数 说明 类型 默认值
actions 在评论内容下面呈现的操作项列表 Array/slot --
author 要显示为注释作者的元素 String/slot --
avatar 头像地址 String/slot --
content 评论的主要内容 String/slot --
datetime 展示时间描述 String/slot --