1.1.6 • Published 7 years ago

react-duoshuo2 v1.1.6

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

react-duoshuo2

A DuoShuo component for React.

Installation

$ npm install react-duoshuo2 --save

Usage

In index.html :

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>Demo</title>
  <link rel="stylesheet" href="index.css" />
</head>
<body>
  <div id="root"></div>
  <script src="common.js"></script>
  <script src="index.js"></script>
</body>
</html>

Then:

import DuoShuo from 'react-duoshuo2';

<DuoShuo
  domain="your-short-name"
  thread="your-data-thread-key"
/>

Properties

domain:   React.PropTypes.string.isRequired,  // DuoShuo short_name 多说二级域名
thread:   React.PropTypes.string.isRequired,  // 文章在原站点中的 ID 或其他唯一标识
image:    React.PropTypes.string,             // 文章图片地址,将用于转发时的附图
author:   React.PropTypes.string,             // 作者在本站中的 ID
position: React.PropTypes.string,             // 该页面中评论框的位置,取值 `top` (评论框在顶端显示),`bottom` (评论框在底端显示)
limit:    React.PropTypes.number,             // 单页显示评论数,取值范围: 1~200
order:    React.PropTypes.string,             // 排序方式,取值:`asc` (从旧到新),`desc` (从新到旧)
onReady:  React.PropTypes.func                // 插件加载完成后的回调函数

See more DuoShuo

License

MIT

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

0.1.0

7 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago