Skip to content

Commit 1766231

Browse files
committed
doc(SpeedDial):修改SpeedDial api文档
1 parent 4194063 commit 1766231

File tree

1 file changed

+21
-50
lines changed

1 file changed

+21
-50
lines changed

packages/core/src/SpeedDial/README.md

Lines changed: 21 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function Demo() {
2424
children={[
2525
{
2626
icon: 'plus',
27-
title: <Text>'Add'</Text>,
27+
title: <Text>Add</Text>,
2828
onPress:()=>console.log('Add')
2929
},
3030
{
@@ -47,57 +47,28 @@ function Demo() {
4747
export default Demo
4848
```
4949

50+
### Props
5051

51-
### SpeedDial Props
52+
| 参数 | 说明 | 类型 | 默认值|
53+
|------|------|-----|------|
54+
| `icon` | 显示的图标 | `string` | `plus` \| `close` |
55+
| `style` | 盒子样式 | `string` | - |
56+
| `bottom` | 初始距离下边位置 | `number` | 350 |
57+
| `right` | 初始距离右边位置 | `number` | 40 |
58+
| `children` | 展开显示的标记 | Array<`SpeedDialItemProps`> | - |
59+
| `isDrag` | 是否支持拖拽 | `boolean` | `false` |
60+
| `transitionDuration` | 动画时间 | `number` | 200 |
61+
| `onOpen` | 打开时触发 | Function | - |
62+
| `onClose` | 关闭时触发 | Function | - |
5263

53-
```ts
54-
import { ViewStyle,ViewProps } from 'react-native';
55-
import { icoType,SpeedDialItemProps } from '@uiw/react-native';
56-
57-
export interface SpeedDialProps extends ViewProps {
58-
/** 显示的图标 [默认显示, 展开显示] */
59-
icon?: icoType,
60-
/** 盒子样式 */
61-
style?: ViewStyle,
62-
/** 初始距离下边位置 */
63-
bottom?: number, //
64-
/** 初始距离右边位置 */
65-
right?: number, //
66-
/** 展开显示的标记 */
67-
children?: Array<SpeedDialItemProps>,
68-
/** 是否支持拖拽 */
69-
isDrag?: boolean,
70-
/** 动画时间 */
71-
transitionDuration?: number,
72-
/**
73-
* 打开时触发
74-
*/
75-
onOpen?: Function,
76-
/**
77-
* 关闭时触发
78-
*/
79-
onClose?: Function,
80-
}
81-
```
8264

65+
### SpeedDialItemProps
8366

84-
### SpeedDialItem Props
67+
| 参数 | 说明 | 类型 | 默认值|
68+
|------|------|-----|------|
69+
| `icon` | 右边显示的图标 | `string` | - |
70+
| `title` | 左边文字 | `JSX.Element` \| `string` \| `number` | - |
71+
| `titleStyle` | 左边文字盒子样式 | ViewStyle | - |
72+
| `iconStyle` | 右边图标盒子样式 | ViewStyle | - |
73+
| `onPress` | 点击右边时触发 | Function | - |
8574

86-
```ts
87-
import { TabsItemIconTypes,IconsName } from '@uiw/react-native';
88-
89-
export interface SpeedDialItemProps {
90-
/** 右边 显示的图标 */
91-
icon: TabsItemIconTypes,
92-
/** 左边文字 */
93-
title: JSX.Element | string | number,
94-
/** 左边文字盒子样式 */
95-
titleStyle?: ViewStyle,
96-
/** 右边图标盒子样式 */
97-
iconStyle?: ViewStyle,
98-
/**
99-
* 点击右边时触发
100-
*/
101-
onPress?: Function,
102-
}
103-
```

0 commit comments

Comments
 (0)