Skip to content

Commit

Permalink
docs(statistic): update (#2623)
Browse files Browse the repository at this point in the history
  • Loading branch information
liweijie0812 authored Nov 29, 2023
1 parent 1755757 commit a0db5e6
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/statistic/statistic.en-US.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
:: BASE_DOC ::

## API

### Statistic Props

name | type | default | description | required
Expand All @@ -23,3 +22,11 @@ trend | String | - | trend。options: increase/decrease | N
trendPlacement | String | left | Position of trending placements。options: left/right | N
unit | TNode | - | Unit content。Typescript:`string \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
value | Number | - | The value of Statistic | N

### StatisticInstanceFunctions 组件实例方法

name | params | return | description
-- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,Typescript:`React.CSSProperties` | N
start | `(from: number, to: number)` | \- | required。Digital scrolling change, from one number to another number
9 changes: 8 additions & 1 deletion src/statistic/statistic.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
:: BASE_DOC ::

## API

### Statistic Props

名称 | 类型 | 默认值 | 说明 | 必传
Expand All @@ -23,3 +22,11 @@ trend | String | - | 趋势。可选项:increase/decrease | N
trendPlacement | String | left | 趋势展示位置。可选项:left/right | N
unit | TNode | - | 单位内容。TS 类型:`string \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-react/blob/develop/src/common.ts) | N
value | Number | - | 数值显示的值 | N

### StatisticInstanceFunctions 组件实例方法

名称 | 参数 | 返回值 | 描述
-- | -- | -- | --
className | String | - | 类名 | N
style | Object | - | 样式,TS 类型:`React.CSSProperties` | N
start | `(from: number, to: number)` | \- | 必需。设置数字滚动变化效果,从一个数字到另一个数字
8 changes: 8 additions & 0 deletions src/statistic/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ export interface TdStatisticProps {
value?: number;
}

/** 组件实例方法 */
export interface StatisticInstanceFunctions {
/**
* 设置数字滚动变化效果,从一个数字到另一个数字
*/
start: (from: number, to: number) => void;
}

export interface animation {
duration: number;
valueFrom: number;
Expand Down

0 comments on commit a0db5e6

Please sign in to comment.