Skip to content

Commit 559b074

Browse files
committed
doc(Timeline):修改Timeline api 文档
1 parent ddbcb8f commit 559b074

File tree

1 file changed

+14
-24
lines changed

1 file changed

+14
-24
lines changed

packages/core/src/Timeline/README.md

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -148,29 +148,19 @@ export default Demo
148148
```
149149

150150
### Props
151+
| 参数 | 说明 | 类型 | 默认值 |
152+
|------|------|-----|------|
153+
| items | 步骤条数据列表 | `TimelineItemsProps[]` | - |
154+
| isReverse | 是否倒序 | `boolean` | - |
155+
| mode | 改变时间轴和内容的相对位置 | `'left' \| 'alternate'` | - |
151156

152-
```ts
153-
export interface TimelineItemsProps {
154-
/** 标题 */
155-
title: string;
156-
/** 子标题 */
157-
tips?: string;
158-
/** 子项内容 */
159-
desc?: string | string[];
160-
/** 自定义图标 */
161-
icon?: IconsName | React.ReactElement | React.ReactNode;
162-
/** 自定义图标颜色 */
163-
color?: string;
164-
/** 自定义图标尺寸 */
165-
size?: number;
166-
}
167157

168-
export interface TimelineProps extends ViewProps {
169-
/** 是否倒序 */
170-
isReverse?: boolean;
171-
/** 步骤条数据列表 */
172-
items: TimelineItemsProps[];
173-
/** 改变时间轴和内容的相对位置 */
174-
mode?: 'left' | 'alternate';
175-
}
176-
```
158+
### TimelineItemsProps
159+
| 参数 | 说明 | 类型 | 默认值 |
160+
|------|------|-----|------|
161+
| title | 标题 | `string` | - |
162+
| tips | 子标题 | `string` | - |
163+
| desc | 子项内容 | `string \| string[]` | - |
164+
| icon | 自定义图标 | `IconsName \| React.ReactElement \| React.ReactNode` | - |
165+
| color | 自定义图标颜色 | `string` | - |
166+
| size | 自定义图标尺寸 | `number` | - |

0 commit comments

Comments
 (0)