File tree Expand file tree Collapse file tree 2 files changed +19
-53
lines changed Expand file tree Collapse file tree 2 files changed +19
-53
lines changed Original file line number Diff line number Diff line change @@ -56,44 +56,14 @@ export default Demo
5656
5757### Props
5858
59- ``` ts
60- type CardCollapseProps = ViewProps & {
61- /**
62- * 是否折叠
63- */
64- isCollapsed: boolean ;
65- /**
66- * 渲染的内容
67- */
68- children: JSX .Element | JSX .Element []
69- /**
70- * 外层样式
71- */
72- containerStyle? : StyleProp <ViewStyle >;
73- /**
74- * 内容样式
75- */
76- contentContainerStyle? : StyleProp <ViewStyle >;
77- /**
78- * 卡片圆角
79- */
80- itemBorderRadius? : number ;
81- /**
82- * 点击卡片回调
83- */
84- onItemPress? : (index : number ) => void ;
85- /**
86- * 卡片折叠回调(值是未来折叠状态)
87- */
88- onCollapseWillChange? : (changed : boolean ) => void ;
89- /**
90- * 卡片折叠回调(值是目前状态)
91- */
92- onCollapseChanged? : (changed : boolean ) => void ;
93- /**
94- * 卡片是否可以点击
95- */
96- disablePresses? : boolean ;
97- };
98- ```
99-
59+ | 参数 | 说明 | 类型 | 默认值 |
60+ | ------| ------| -----| ------|
61+ | ` isCollapsed ` | 是否折叠 | ` boolean ` | - |
62+ | ` children ` | 渲染的内容 | ` JSX.Element, JSX.Element[] ` | - |
63+ | ` containerStyle ` | 外层样式 | ` StyleProp<ViewStyle> ` | - |
64+ | ` contentContainerStyle ` | 内容样式 | ` StyleProp<ViewStyle> ` | - |
65+ | ` itemBorderRadius ` | 卡片圆角 | ` number ` | - |
66+ | ` onItemPress ` | 点击卡片回调 | (` index: number) => void ` | - |
67+ | ` onCollapseWillChange ` | 卡片折叠回调(值是未来折叠状态) | ` (changed: boolean) => void ` | - |
68+ | ` onCollapseChanged ` | 卡片折叠回调(值是目前状态) | ` (changed: boolean) => void ` | - |
69+ | ` disablePresses ` | 卡片是否可以点击 | ` boolean ` | - |
Original file line number Diff line number Diff line change @@ -62,15 +62,11 @@ export default Demo
6262
6363### props
6464
65- ``` ts
66- export interface ImageViewerProps extends ViewProps {
67- /** 图片宽度 */
68- width? : number ,
69- /** 图片高度 */
70- height? : number ,
71- /** 图像源(远程URL或本地文件资源 */
72- src? : string | number ;
73- /** 默认展示第几张图片 */
74- defaultIndex: number
75- }
76- ```
65+ 组件继承 [ ` ViewProps ` ] ( https://reactnative.dev/docs/view )
66+
67+ | 参数 | 说明 | 类型 | 默认值 |
68+ | ------| ------| -----| ------|
69+ | ` width ` | 图片宽度 | ` number ` | - |
70+ | ` height ` | 图片高度 | ` number ` | - |
71+ | ` src ` | 图像源(远程URL或本地文件资源) | ` 'string' \| 'number' ` | - |
72+ | ` defaultIndex ` | 默认展示第几张图片 | ` number ` | - |
You can’t perform that action at this time.
0 commit comments