1.3.2 • Published 5 months ago

vcmt v1.3.2

Weekly downloads
12
License
MIT
Repository
github
Last release
5 months ago

💡 简介

vcomment 🧵 B3log 分布式社区的评论组件,欢迎加入下一代社区网络。

🛠️ 使用文档

CommonJS

  • 安装依赖
npm install vcmt --save
  • 在代码中引入并初始化对象,可参考 index.js
import Vcomment from '../src/index'

const vcomment = new Vcomment({
  id: 'comments',
  postId: '1353745196751',
  userName: 'vanessa',
  url: 'http://localhost:8080',
  currentPage: 3,
  vditor: {
    hljsEnable: false,
    hljsStyle: "github"
  }
})

vcomment.render()

HTML script

<!-- <script src="https://cdn.jsdelivr.net/npm/vcmt@1.3.1/dist/index.min.js" defer></script> -->
<script src="https://unpkg.com/vcmt@1.3.1/dist/index.min.js" defer></script>

示例代码

API

options

说明默认值
id渲染元素的 id-
postId文章 id-
userName用户名-
url评论 API 地址"https://ld246.com"
currentPage评论页码1
error获取列表错误回调-
vditor编辑器参数-
vditor.hljsEnable是否启用高亮true
vditor.hljsStyle高亮样式"github"
vditor.emoji自定义表情 { key: string: string }{}
vditor.lang语言'zh_CN'

methods

说明
render渲染评论
parseMarkdown(vditorOptions: IOptionsVditor)Markdown 渲染
lazyLoadImage图片延迟加载

欢迎关注 B3log 开源社区微信公众号 B3log开源

image-d3c00d78

1.3.2

5 months ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.11

4 years ago

1.2.9

4 years ago

1.2.10

4 years ago

1.2.8

4 years ago

1.2.7

4 years ago

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.12

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago