# class100-integral

> class100-integral 大课组件 计分板

Latest version **0.1.3** (published 2017-09-19) · 0 weekly downloads

## Install

```sh
npm install class100-integral
pnpm add class100-integral
yarn add class100-integral
bun add class100-integral
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2017-09-19 |
| First published | 2017-09-06 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | hexiao-o |

## Links

- npm: https://www.npmjs.com/package/class100-integral
- npm.io page: https://npm.io/package/class100-integral

## Dependencies (6)

- [md5](https://npm.io/package/md5.md) ^2.2.1
- [antd](https://npm.io/package/antd.md) ^2.13.0
- [react](https://npm.io/package/react.md) ^15.4.0
- [react-dom](https://npm.io/package/react-dom.md) ^15.4.0
- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [react-custom-scrollbars](https://npm.io/package/react-custom-scrollbars.md) ^4.1.2

## Recent versions

- 0.1.3 (latest) — 2017-09-19
- 0.1.2 — 2017-09-19
- 0.1.1 — 2017-09-14
- 0.1.0 — 2017-09-12
- 0.0.9 — 2017-09-08
- 0.0.8 — 2017-09-08
- 0.0.7 — 2017-09-08
- 0.0.6 — 2017-09-07
- 0.0.5 — 2017-09-07
- 0.0.4 — 2017-09-07
- 0.0.3 — 2017-09-07
- 0.0.2 — 2017-09-07
- 0.0.1 — 2017-09-06

## README

class100-integral 大课组件 计分板

## 何时使用
开发基于dva的react组件时
```
npm install -S class100-integral 
```
## API
```jsx

import { Integral, Ranking, Scoreboard } from 'class100-integral';

```

### Integral 计分板组件 API

| 参数       | 说明           | 类型             | 默认值       |
|------------|----------------|------------------|--------------|
| className    | 类名 | string          | 无           |
| teams    | team列表 | array          | 无           |
| showNum    | 排名每页显示个数 | number          | 6           |
| onAddTeam    | 添加team | function({ team: {}, teams: [] })          | 无           |
| onDeleteTeam    | 删除team | function({ team: {}, teams: [] })          | 无           |
| onAddPoints    | team加分 | function({ team: {}, teams: [] })          | 无           |
| onTeamChange    | team信息修改 | function({ team: {}, teams: [] })          | 无           |
| onShowTable    | 显示排名 | function({ teams: [] })          | 无           |
| onHideTable    | 隐藏排名 | function({})          | 无           |
| onRankingPrev    | 排名上一页 | function({ page: 1, teams: [] })          | 无           |
| onRankingNext    | 排名下一页 | function({ page: 1, teams: [] })          | 无           |

### Ranking 计分排位组件 API

| 参数       | 说明           | 类型             | 默认值       |
|------------|----------------|------------------|--------------|
| className    | 类名 | string          | 无           |
| teams    | 显示team例表数据 | array          | 无           |

### Scoreboard 添加分数组件 API

| 参数       | 说明           | 类型             | 默认值       |
|------------|----------------|------------------|--------------|
| className    | 类名 | string          | 无           |
| team    | 当前team数据 | object          | 无           |

### team json
```
{
 id: md5(new Date() + Math.random()),    // id
 ranking: 1,    // 排名
 name: 'team-1',    // 名称
 addPoints: 0,   // 添加分数
 points: 0,   // 总分
}
```

## 开发

1. clone 代码
```
git clone https://github.com/hexiao-o/IntegralPlate.git
```
2. 安装依赖和启动服务

```
1. 新开窗口 cd class100-integral && npm install && cd example && npm install
2. 新开窗口 npm run dev
```

3. 打开网页
```
open http://localhost:3000
```

---
_Source: https://npm.io/package/class100-integral · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
