Files
mes-ui-d2/static/markdownFiles/article/组件 - 数字动画.md
李杨 a056301b0b no message
Former-commit-id: ad7c850730b9b54c6a4e5bd01c06c763a90f325f
Former-commit-id: 53953d7012ba47db0eab1b7ee28b69667c2d4577
Former-commit-id: 86d07584e21cc33f0802a5b8ef2817d72ffa798b
2018-02-14 16:52:28 +08:00

797 B

参数

参数名 介绍 必选 值类型 可选值 默认值
start 起始值 Number 0
end 结束值 Number 0
decimals 小数位数 Number 0
duration 持续时间 Number 2
options 设置项 Object 空对象
callback 回调函数 Function 空函数

示例

// 基本使用方法
<CountUp
  :end="100">
</CountUp>

// 设置始末值
<CountUp
  :start="14"
  :end="100">
</CountUp>

// 设置动画时间
<CountUp
  :end="100"
  :decimals="2">
</CountUp>

组件会在页面上渲染 <span> 标签

组件根据 countUp.js 封装,options 参数详见原始插件文档