-
zhangwei
2025-03-05 16213c0f85aa3ac8317797bf4a05fd12940e16d3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { AllowedComponentProps, VNodeProps } from './_common'
 
declare interface CountToProps {
  /**
   * 开始值
   * @default 0
   */
  startVal?: string | number
  /**
   * 结束值
   * @default 0
   */
  endVal?: string | number
  /**
   * 滚动过程所需的时间,单位ms
   * @default 2000
   */
  duration?: string | number
  /**
   * 是否自动开始滚动
   * @default true
   */
  autoplay?: boolean
  /**
   * 要显示的小数位数,详细见[文档](https://www.uviewui.com/components/countTo.html#%E6%98%AF%E5%90%A6%E6%98%BE%E7%A4%BA%E5%B0%8F%E6%95%B0%E4%BD%8D)
   * @default 0
   */
  decimals?: string | number
  /**
   * 滚动结束时,是否缓动结尾,详细见[文档](https://www.uviewui.com/components/countTo.html#%E8%AE%BE%E7%BD%AE%E6%BB%9A%E5%8A%A8%E7%9B%B8%E5%85%B3%E5%8F%82%E6%95%B0)
   * @default true
   */
  useEasing?: boolean
  /**
   * 十进制分割
   */
  decimal?: string
  /**
   * 字体颜色
   * @default #606266
   */
  color?: string
  /**
   * 字体大小,单位px
   * @default 22
   */
  fontSize?: string | number
  /**
   * 字体是否加粗
   * @default false
   */
  bold?: boolean
  /**
   * 千位分隔符,详细见[文档](https://www.uviewui.com/components/countTo.html#%E5%8D%83%E5%88%86%E4%BD%8D%E5%88%86%E9%9A%94%E7%AC%A6)
   */
  separator?: string
  /**
   * 数值滚动到目标值时触发
   */
  onEnd?: () => any
}
 
declare interface _CountToRef {
  /**
   * `autoplay`为`false`时,通过此方法启动滚动
   */
  start: () => void
  /**
   * 暂停后重新开始滚动(从暂停前的值开始滚动)
   */
  reStart: () => void
  /**
   * 暂停滚动
   */
  paused: () => void
}
 
declare interface _CountTo {
  new (): {
    $props: AllowedComponentProps &
      VNodeProps &
      CountToProps
  }
}
 
export declare const CountTo: _CountTo
 
export declare const CountToRef: _CountToRef