|
1 | 1 | :: BASE_DOC :: |
2 | 2 |
|
3 | 3 | ## API |
| 4 | + |
4 | 5 | ### Statistic Props |
5 | 6 |
|
6 | 7 | name | type | default | description | required |
7 | 8 | -- | -- | -- | -- | -- |
8 | 9 | animation | Object | - | Animation effect control, `duration` refers to the transition time of the animation `unit: millisecond`, `valueFrom` refers to the initial value of the animation. `{ duration, valueFrom }`。Typescript:`animation` `interface animation { duration: number; valueFrom: number; }`。[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/statistic/type.ts) | N |
9 | 10 | animationStart | Boolean | false | Whether to start animation | N |
10 | | -color | String | - | Color style, followed by TDesign style black, blue, red, orange, green.Can also be any RGB equivalent supported by [CSS color](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value)。options:black/blue/red/orange/green | N |
| 11 | +color | String | - | The color style can support TDesign's light and dark modes with the following options: black, blue, red, orange, and green. Alternatively, it can be any [CSS color](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value) value, but in this case, TDesign's light and dark modes will not be supported. | N |
11 | 12 | decimalPlaces | Number | - | Decimal places | N |
12 | 13 | extra | String / Slot / Function | - | Additional display content。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N |
13 | 14 | format | Function | - | Format numeric display value。Typescript:`(value: number) => number` | N |
14 | 15 | loading | Boolean | false | Loading | N |
15 | 16 | prefix | String / Slot / Function | - | Prefix content, display priority is higher than trend。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N |
16 | | -separator | String | , | The carry separator is displayed by default, and can be customized to other content. When `separator = ''` is set to an empty string/null/undefined, the separator is hidden | N |
| 17 | +separator | String | , | Thousands separator is displayed by default, and can be customized to other content, and the default separator is displayed when `separator = ''` is set to an empty string/null/undefined | N |
17 | 18 | suffix | String / Slot / Function | - | Suffix content, display priority is higher than trend。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N |
18 | 19 | title | String / Slot / Function | - | The title of Statistic。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N |
19 | | -trend | String | - | trend。options:increase/decrease | N |
20 | | -trendPlacement | String | left | Position of trending placements。options:left/right | N |
| 20 | +trend | String | - | trend。options: increase/decrease | N |
| 21 | +trendPlacement | String | left | Position of trending placements。options: left/right | N |
21 | 22 | unit | String / Slot / Function | - | Unit content。Typescript:`string \| TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N |
22 | 23 | value | Number | - | The value of Statistic | N |
| 24 | + |
| 25 | +### StatisticInstanceFunctions 组件实例方法 |
| 26 | + |
| 27 | +name | params | return | description |
| 28 | +-- | -- | -- | -- |
| 29 | +start | \- | \- | required。start animation |
0 commit comments