Files
mes-ui-d2/docs/zh/components/count-up.md
liyang 88bcdd6d6f no message
Former-commit-id: 9c99fa78c3e9d9453e748436f0145eb22284db16
Former-commit-id: 514ae0d6194941cd08584367b1970c2e610d99d5
Former-commit-id: beaede8116f4791cdf772b2848f849b04e1a6ee9
2018-06-03 19:30:57 +08:00

29 lines
803 B
Markdown

# 数字动画
## 参数
| 参数名 | 介绍 | 必选 | 值类型 | 可选值 | 默认值 |
| --- | --- | --- | --- | --- | --- |
| start | 起始值 | 非 | Number | | 0 |
| end | 结束值 | 是 | Number | | 0 |
| decimals | 小数位数 | 非 | Number | | 0 |
| duration | 持续时间 | 非 | Number | | 2 |
| options | 设置项 | 非 | Object | | 空对象 |
| callback | 回调函数 | 非 | Function | | 空函数 |
## 示例
``` vue
// 基本使用方法
<CountUp :end="100"></CountUp>
// 设置始末值
<CountUp :start="14" :end="100"></CountUp>
// 设置动画时间
<CountUp :end="100" :decimals="2"></CountUp>
```
组件会在页面上渲染 `<span>` 标签
组件根据 [countUp.js](https://github.com/inorganik/countUp.js) 封装,`options` 参数详见原始插件文档