lanyun-count-to

介绍

该组件用于将数字动态滚动到某一个值

使用方法

import '../../components/lanyun-count-to.stml'

例子

<lanyun-count-to id="countTo" @end="handleEnd" :autoplay="false" :duration="500" :start="0" :end="20000" :decimals="2" separator="," />

props 属性

参数 说明 类型 默认值
start 起始值,必填 number | string -
end 结束值,必填 number | string -
autoplay 是否自动开始滚动 boolean true
duration 滚动时间,单位ms number | string 1000
decimals 显示的小数位数 number | string 0
separator 千位分隔符 string -

events 事件

事件名 说明 回调参数
end 滚动结束时触发 -

methods 方法

方法名 说明 参数
start 开始滚动 -

帮助说明

手动开始要获取dom后执行start方法,详见demo中的handlePlay方法
是否仍需要帮助? 请保持联络!
最后更新于 2024/07/22