Skip to content

Commit 538472a

Browse files
author
rulishu
committed
Merge branch 'dev' of github.com:uiwjs/react-native-uiw into rls
2 parents 26ff9c5 + 292f790 commit 538472a

File tree

2 files changed

+31
-64
lines changed

2 files changed

+31
-64
lines changed

packages/core/src/Grid/README.md

Lines changed: 17 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -88,44 +88,21 @@ function Demo() {
8888
export default Demo
8989

9090
```
91-
9291
### Props
93-
94-
95-
```ts
96-
interface ItemData {
97-
icon?: React.ReactNode;
98-
text?: React.ReactNode;
99-
}
100-
101-
```
102-
103-
```ts
104-
export interface GridProps extends ViewProps {
105-
/**
106-
* 传入的菜单数据,`icon` 可以是 `ReactNode` 或者 `uri`
107-
* @default []
108-
*/
109-
data?: ItemData[];
110-
/**
111-
* 列数
112-
* @default 4
113-
*/
114-
columns?: number;
115-
/**
116-
* 是否有间隔线
117-
* @default true
118-
*/
119-
hasLine?: boolean;
120-
/** 单元格样式 */
121-
itemStyle?: StyleProp<ViewStyle>;
122-
/** 单元格文本样式 */
123-
textStyle?: StyleProp<TextStyle & ViewStyle>;
124-
/** 图片样式,可设置图片/图标尺寸 */
125-
iconStyle?: StyleProp<ImageStyle & TextStyle & ViewStyle>;
126-
/** 自定义单元格 */
127-
renderItem?: (data: ItemData, index: number, row: number) => React.ReactNode;
128-
/** 点击宫格回调函数 */
129-
onPress?: (data: ItemData, index: number, row: number, event: GestureResponderEvent) => void;
130-
}
131-
```
92+
| 参数 | 说明 | 类型 | 默认值 |
93+
|------|------|-----|------|
94+
| data | 菜单数据,`icon` 可以是 `ReactNode` 或者 `uri` | `ItemData[]` | - |
95+
| columns | 列数 | `number` | 4 |
96+
| hasLine | 是否有间隔线 | `boolean` | true |
97+
| itemStyle | 单元格样式 | `StyleProp<ViewStyle>` | - |
98+
| textStyle | 单元格文本样式 | `StyleProp<TextStyle & ViewStyle>` | - |
99+
| iconStyle | 图片样式,可设置图片/图标尺寸 | `StyleProp<ImageStyle & TextStyle & ViewStyle>` | - |
100+
| renderItem | 自定义单元格 | `(data: ItemData, index: number, row: number) => React.ReactNode` | - |
101+
| onPress | 点击宫格回调函数 | `(data: ItemData, index: number, row: number, event: GestureResponderEvent) => void` | - |
102+
103+
104+
### ItemData
105+
| 参数 | 说明 | 类型 | 默认值 |
106+
|------|------|-----|------|
107+
| text | 显示文字 | `React.ReactNode` | - |
108+
| icon | 图标 | `React.ReactNode` | - |

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)