Skip to content

Commit b5e562f

Browse files
authored
doc: add timeline doc (#150)
* doc: edit layout * component: add steps component * edit doc clash * doc: add steps doc * component: add timeLine component * doc: add timeLine doc * doc: edit steps doc
1 parent bfdf2a2 commit b5e562f

File tree

5 files changed

+17
-2
lines changed

5 files changed

+17
-2
lines changed

packages/core/src/Steps/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@ function Demo() {
3636
| 参数 | 说明 | 类型 | 默认值 |
3737
| -------------------- | ------------ | ------- | ------- |
3838
| `title` |步骤标题 | Item[] | - |
39-
| `desc` | 步骤说明文字 | Number | 0 |
39+
| `desc` | 步骤说明文字 | String | - |
4040
| `status` | 步骤的状态,'success' 或 'error' | String | - |

packages/core/src/Timeline/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Timeline 时间轴
66
### 基础示例
77

88
```jsx
9-
import { Steps } from '@uiw/react-native';
9+
import { Timeline } from '@uiw/react-native';
1010

1111
function Demo() {
1212
return (
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import Markdown, { importAll } from '../../../component/Markdown';
2+
3+
export default class Page extends Markdown {
4+
path="/packages/core/src/Timeline/README.md"
5+
getMarkdown = async () => {
6+
const md = await import('@uiw/react-native/lib/Timeline/README.md');
7+
// 支持 markdown 中,相对于当前 index.tsx 相对路径引入图片资源
8+
importAll((require as any).context('./', true, /\.(png|gif|jpg)$/), this.imageFiles);
9+
return md.default || md;
10+
}
11+
}

website/src/routes/menus.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const componentMenus: MenuData[] = [
3434
{ path: "/components/grid", name: "Grid 宫格" },
3535
{ path: "/components/list", name: "List 列表" },
3636
{ path: "/components/steps", name: "Steps 步骤条" },
37+
{ path: "/components/timeLine", name: "Timeline 时间轴" },
3738
{ divider: true, name: "Feedback" },
3839
{ path: "/components/loader", name: "Loader 加载" },
3940
{ path: "/components/modal", name: "Modal 模态框" },

website/src/routes/router.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,7 @@ export const getRouterData = {
168168
'/components/steps': {
169169
component: dynamicWrapper([], () => import('../pages/components/steps')),
170170
},
171+
'/components/timeLine': {
172+
component: dynamicWrapper([], () => import('../pages/components/timeLine')),
173+
},
171174
};

0 commit comments

Comments
 (0)