mirror of
https://github.com/Tencent/Hippy.git
synced 2026-10-24 18:20:12 +08:00
docs(platform): change supported platform expression
This commit is contained in:
+119
-119
@@ -46,20 +46,20 @@ import icon from './qb_icon_new.png';
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -------- |
|
||||
| onLayout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置 | `Function` | `ALL` |
|
||||
| onLoad | 加载成功完成时调用此回调函数。 | `Function` | `ALL` |
|
||||
| onLoadStart | 加载开始时调用。 例如, `onLoadStart={() => this.setState({ loading: true })}` | `Function` | `ALL` |
|
||||
| onLoadEnd | 加载结束后,不论成功还是失败,调用此回调函数。 | `Function` | `ALL` |
|
||||
| resizeMode | 决定当组件尺寸和图片尺寸不成比例的时候如何调整图片的大小。 | `enum (cover, contain, stretch, repeat, center)` | `ALL` |
|
||||
| source | uri 是一个表示图片的资源标识的字符串。 现在支持的图片格式有 `png` , `jpg` , `jpeg` , `bmp` , `gif` 。 | `{ uri: string }` | `ALL` |
|
||||
| defaultSource | 指定当 `Image` 组件还没加载出来 `source` 属性指定的图片的占位符图片,当 `source` 属性指定的图片加载失败时, `Image` 组件会显示 `defaultSource` 属性指定的图片 | `string`: 图片 base64 字符串 | `ALL` |
|
||||
| onError | 当加载错误的时候调用此回调函数,参数为 `nativeEvent: { error }` | `Function` | `ALL` |
|
||||
| capInsets | 当调整 `Image` 大小的时候,由 `capInsets` 指定的边角尺寸会被固定而不进行缩放,而中间和边上其他的部分则会被拉伸。这在制作一些可变大小的圆角按钮、阴影、以及其它资源的时候非常有用。 | `{ top: number, left: number, bottom: number, right: number }` | `ALL` |
|
||||
| onLayout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置 | `Function` | `Android、iOS` |
|
||||
| onLoad | 加载成功完成时调用此回调函数。 | `Function` | `Android、iOS` |
|
||||
| onLoadStart | 加载开始时调用。 例如, `onLoadStart={() => this.setState({ loading: true })}` | `Function` | `Android、iOS` |
|
||||
| onLoadEnd | 加载结束后,不论成功还是失败,调用此回调函数。 | `Function` | `Android、iOS` |
|
||||
| resizeMode | 决定当组件尺寸和图片尺寸不成比例的时候如何调整图片的大小。 | `enum (cover, contain, stretch, repeat, center)` | `Android、iOS` |
|
||||
| source | uri 是一个表示图片的资源标识的字符串。 现在支持的图片格式有 `png` , `jpg` , `jpeg` , `bmp` , `gif` 。 | `{ uri: string }` | `Android、iOS` |
|
||||
| defaultSource | 指定当 `Image` 组件还没加载出来 `source` 属性指定的图片的占位符图片,当 `source` 属性指定的图片加载失败时, `Image` 组件会显示 `defaultSource` 属性指定的图片 | `string`: 图片 base64 字符串 | `Android、iOS` |
|
||||
| onError | 当加载错误的时候调用此回调函数,参数为 `nativeEvent: { error }` | `Function` | `Android、iOS` |
|
||||
| capInsets | 当调整 `Image` 大小的时候,由 `capInsets` 指定的边角尺寸会被固定而不进行缩放,而中间和边上其他的部分则会被拉伸。这在制作一些可变大小的圆角按钮、阴影、以及其它资源的时候非常有用。 | `{ top: number, left: number, bottom: number, right: number }` | `Android、iOS` |
|
||||
| onProgress | 在加载过程中不断调用,参数为 `nativeEvent: { loaded: number, total: number }`, `loaded` 表示加载中的图片大小, `total` 表示图片总大小 | `Function` | `iOS` |
|
||||
| onTouchDown | 当用户开始在控件上按下手指时,将回调此函数,并将触屏点信息作为参数传递进来; 参数为 `nativeEvent: { name, page_x, page_y, id }`, `page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置| `Function` | `ALL` |
|
||||
| onTouchMove | 当用户在控件移动手指时,此函数会持续收到回调,并通过event参数告知控件的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| onTouchEnd | 当触屏操作结束,用户在该控件上抬起手指时,此函数将被回调,event参数也会通知当前的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| onTouchCancel | 当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,触屏点信息也会通过event参数告知前端;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| onTouchDown | 当用户开始在控件上按下手指时,将回调此函数,并将触屏点信息作为参数传递进来; 参数为 `nativeEvent: { name, page_x, page_y, id }`, `page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置| `Function` | `Android、iOS` |
|
||||
| onTouchMove | 当用户在控件移动手指时,此函数会持续收到回调,并通过event参数告知控件的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| onTouchEnd | 当触屏操作结束,用户在该控件上抬起手指时,此函数将被回调,event参数也会通知当前的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| onTouchCancel | 当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,触屏点信息也会通过event参数告知前端;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
|
||||
## 方法
|
||||
|
||||
@@ -95,31 +95,31 @@ import icon from './qb_icon_new.png';
|
||||
| --------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | -------- |
|
||||
| bounces | 是否开启回弹效果,默认 `true` | `boolean` | `iOS` |
|
||||
| overScrollEnabled | 是否开启回弹效果,默认 `true` | `boolean` | `Android` |
|
||||
| getRowKey | 指定一个函数,在其中返回对应条目的 Key 值,详见 [React 官文](//reactjs.org/docs/lists-and-keys.html) | `(index: number) => any` | `ALL` |
|
||||
| getRowStyle | 设置`ListViewItem`容器的样式。当设置了 `horizontal=true` 启用横向 `ListView` 时,需显式设置 `ListViewItem` 宽度 | `(index: number) => styleObject` | `ALL` |
|
||||
| getRowType | 指定一个函数,在其中返回对应条目的类型(返回Number类型的自然数,默认是0),List 将对同类型条目进行复用,所以合理的类型拆分,可以很好地提升 List 性能。`注意:同一 type 的 item 组件由于复用可能不会走完整组件创建生命周期` | `(index: number) => number` | `ALL` |
|
||||
| getRowKey | 指定一个函数,在其中返回对应条目的 Key 值,详见 [React 官文](//reactjs.org/docs/lists-and-keys.html) | `(index: number) => any` | `Android、iOS` |
|
||||
| getRowStyle | 设置`ListViewItem`容器的样式。当设置了 `horizontal=true` 启用横向 `ListView` 时,需显式设置 `ListViewItem` 宽度 | `(index: number) => styleObject` | `Android、iOS` |
|
||||
| getRowType | 指定一个函数,在其中返回对应条目的类型(返回Number类型的自然数,默认是0),List 将对同类型条目进行复用,所以合理的类型拆分,可以很好地提升 List 性能。`注意:同一 type 的 item 组件由于复用可能不会走完整组件创建生命周期` | `(index: number) => number` | `Android、iOS` |
|
||||
| horizontal | 指定 `ListView` 是否采用横向布局。`default: undefined` 纵向布局 | `boolean \| undefined` | `Android` |
|
||||
| initialListSize | 指定在组件刚挂载的时候渲染多少行数据。用这个属性来确保首屏显示合适数量的数据,而不是花费太多帧时间逐步显示出来。 | `number` | `ALL` |
|
||||
| initialContentOffset | 初始位移值。在列表初始化时即可指定滚动距离,避免初始化后再通过 scrollTo 系列方法产生的闪动。Android 在 `2.8.0` 版本后支持 | `number` | `ALL` |
|
||||
| onAppear | 当有`ListViewItem`滑动进入屏幕时(曝光)触发,入参返回曝光的`ListViewItem`对应索引值。 | `(index) => void` | `ALL` |
|
||||
| onDisappear | 当有`ListViewItem`滑动离开屏幕时触发,入参返回离开的`ListViewItem`对应索引值。 | `(index) => void` | `ALL` |
|
||||
| onWillAppear | 当有`ListViewItem`至少一个像素进入屏幕时(曝光)触发,入参返回曝光的`ListViewItem`对应索引值。 `最低支持版本2.3.0` | `(index) => void` | `ALL` |
|
||||
| onWillDisappear | 当有`ListViewItem`至少一个像素滑动离开屏幕时触发,入参返回离开的`ListViewItem`对应索引值。 `最低支持版本2.3.0`| `(index) => void` | `ALL` |
|
||||
| onEndReached | 当所有的数据都已经渲染过,并且列表被滚动到最后一条时,将触发 `onEndReached` 回调。 | `Function` | `ALL` |
|
||||
| onMomentumScrollBegin | 在 `ListView` 开始滑动的时候触发。 | `Function` | `ALL` |
|
||||
| onMomentumScrollEnd | 在 `ListView` 结束滑动的时候触发。 | `Function` | `ALL` |
|
||||
| onScroll | 在 `ListView` 滑动时回调。调用频率可能较高,可使用 `scrollEventThrottle` 进行频率控制。 注意:ListView 在滚动时会进行组件回收,不要在滚动时对 renderRow() 生成的 ListItemView 做任何 ref 节点级的操作(例如:所有 callUIFunction 和 measureInAppWindow 方法),回收后的节点将无法再进行操作而报错。横向 ListView 时,Android 在 `2.8.0` 版本后支持 | `(obj: { contentOffset: { x: number, y: number } }) => any` | `ALL` |
|
||||
| onScrollBeginDrag | 当用户开始拖拽 `ListView` 时调用。 | `Function` | `ALL` |
|
||||
| onScrollEndDrag | 当用户停止拖拽 `ListView` 或者放手让 `ListView` 开始滑动时调用 | `Function` | `ALL` |
|
||||
| preloadItemNumber | 指定当列表滚动至倒数第几行时触发 `onEndReached` 回调。 | `number` | `ALL` |
|
||||
| renderRow | 这里的入参是当前行的索引 index,需返回 Node 节点。在这里可以凭借 index 获取到具体这一行单元格的数据,从而决定如何渲染这个单元格。 | `(index: number) => Node` | `ALL` |
|
||||
| rowShouldSticky | 在回调函数,根据传入参数index(ListView单元格的index)返回 true 或 false 指定对应的 item 是否需要使用悬停效果(滚动到顶部时,会悬停在List顶部,不会滚出屏幕)。 | `(index: number) => boolean` | `ALL` |
|
||||
| scrollEventThrottle | 指定滑动事件的回调频率,传入数值指定了多少毫秒(ms)组件会调用一次 `onScroll` 事件 | `number` | `ALL` |
|
||||
| scrollEnabled | 滑动是否开启。`default: true` | `boolean` | `All` |
|
||||
| initialListSize | 指定在组件刚挂载的时候渲染多少行数据。用这个属性来确保首屏显示合适数量的数据,而不是花费太多帧时间逐步显示出来。 | `number` | `Android、iOS` |
|
||||
| initialContentOffset | 初始位移值。在列表初始化时即可指定滚动距离,避免初始化后再通过 scrollTo 系列方法产生的闪动。Android 在 `2.8.0` 版本后支持 | `number` | `Android、iOS` |
|
||||
| onAppear | 当有`ListViewItem`滑动进入屏幕时(曝光)触发,入参返回曝光的`ListViewItem`对应索引值。 | `(index) => void` | `Android、iOS` |
|
||||
| onDisappear | 当有`ListViewItem`滑动离开屏幕时触发,入参返回离开的`ListViewItem`对应索引值。 | `(index) => void` | `Android、iOS` |
|
||||
| onWillAppear | 当有`ListViewItem`至少一个像素进入屏幕时(曝光)触发,入参返回曝光的`ListViewItem`对应索引值。 `最低支持版本2.3.0` | `(index) => void` | `Android、iOS` |
|
||||
| onWillDisappear | 当有`ListViewItem`至少一个像素滑动离开屏幕时触发,入参返回离开的`ListViewItem`对应索引值。 `最低支持版本2.3.0`| `(index) => void` | `Android、iOS` |
|
||||
| onEndReached | 当所有的数据都已经渲染过,并且列表被滚动到最后一条时,将触发 `onEndReached` 回调。 | `Function` | `Android、iOS` |
|
||||
| onMomentumScrollBegin | 在 `ListView` 开始滑动的时候触发。 | `Function` | `Android、iOS` |
|
||||
| onMomentumScrollEnd | 在 `ListView` 结束滑动的时候触发。 | `Function` | `Android、iOS` |
|
||||
| onScroll | 在 `ListView` 滑动时回调。调用频率可能较高,可使用 `scrollEventThrottle` 进行频率控制。 注意:ListView 在滚动时会进行组件回收,不要在滚动时对 renderRow() 生成的 ListItemView 做任何 ref 节点级的操作(例如:所有 callUIFunction 和 measureInAppWindow 方法),回收后的节点将无法再进行操作而报错。横向 ListView 时,Android 在 `2.8.0` 版本后支持 | `(obj: { contentOffset: { x: number, y: number } }) => any` | `Android、iOS` |
|
||||
| onScrollBeginDrag | 当用户开始拖拽 `ListView` 时调用。 | `Function` | `Android、iOS` |
|
||||
| onScrollEndDrag | 当用户停止拖拽 `ListView` 或者放手让 `ListView` 开始滑动时调用 | `Function` | `Android、iOS` |
|
||||
| preloadItemNumber | 指定当列表滚动至倒数第几行时触发 `onEndReached` 回调。 | `number` | `Android、iOS` |
|
||||
| renderRow | 这里的入参是当前行的索引 index,需返回 Node 节点。在这里可以凭借 index 获取到具体这一行单元格的数据,从而决定如何渲染这个单元格。 | `(index: number) => Node` | `Android、iOS` |
|
||||
| rowShouldSticky | 在回调函数,根据传入参数index(ListView单元格的index)返回 true 或 false 指定对应的 item 是否需要使用悬停效果(滚动到顶部时,会悬停在List顶部,不会滚出屏幕)。 | `(index: number) => boolean` | `Android、iOS` |
|
||||
| scrollEventThrottle | 指定滑动事件的回调频率,传入数值指定了多少毫秒(ms)组件会调用一次 `onScroll` 事件 | `number` | `Android、iOS` |
|
||||
| scrollEnabled | 滑动是否开启。`default: true` | `boolean` | `Android、iOS` |
|
||||
| showScrollIndicator | 是否显示滚动条。`default: true` | `boolean` | `iOS` |
|
||||
| renderPullHeader | 设置列表下拉头部(刷新条),配合`onHeaderReleased`、`onHeaderPulling` 和 `collapsePullHeader`使用, 参考 [DEMO](//github.com/Tencent/Hippy/tree/master/examples/hippy-react-demo/src/components/PullHeader/index.jsx)。 | `() => View` | `ALL` |
|
||||
| onHeaderPulling | 下拉过程中触发, 事件会通过 contentOffset 参数返回拖拽高度,可以根据下拉偏移量做相应的逻辑。 | `(obj: { contentOffset: number }) => any` | `ALL` |
|
||||
| onHeaderReleased | 下拉超过内容高度,松手后触发。 | `() => any` | `ALL` |
|
||||
| renderPullHeader | 设置列表下拉头部(刷新条),配合`onHeaderReleased`、`onHeaderPulling` 和 `collapsePullHeader`使用, 参考 [DEMO](//github.com/Tencent/Hippy/tree/master/examples/hippy-react-demo/src/components/PullHeader/index.jsx)。 | `() => View` | `Android、iOS` |
|
||||
| onHeaderPulling | 下拉过程中触发, 事件会通过 contentOffset 参数返回拖拽高度,可以根据下拉偏移量做相应的逻辑。 | `(obj: { contentOffset: number }) => any` | `Android、iOS` |
|
||||
| onHeaderReleased | 下拉超过内容高度,松手后触发。 | `() => any` | `Android、iOS` |
|
||||
| editable | 是否可编辑,开启侧滑删除时需要设置为 `true`。`最低支持版本2.9.0` | `boolean` | `iOS` |
|
||||
| delText | 侧滑删除文本。`最低支持版本2.9.0` | `string` | `iOS` |
|
||||
| onDelete | 在列表项侧滑删除时调起。`最低支持版本2.9.0` | `(nativeEvent: { index: number}) => void` | `iOS` |
|
||||
@@ -158,16 +158,16 @@ import icon from './qb_icon_new.png';
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| --------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -------- |
|
||||
| animated | 弹出时是否需要带动画 | `boolean` | `ALL` |
|
||||
| animationType | 动画效果 | `enum (none, slide, fade, slide_fade)` | `ALL` |
|
||||
| animated | 弹出时是否需要带动画 | `boolean` | `Android、iOS` |
|
||||
| animationType | 动画效果 | `enum (none, slide, fade, slide_fade)` | `Android、iOS` |
|
||||
| supportedOrientations | 支持屏幕翻转方向 | `enum (portrait, portrait-upside-down, landscape, landscape-left, landscape-right)[]` | `iOS` |
|
||||
| immersionStatusBar | 是否是沉浸式状态栏。`default: true` | `boolean` | `Android` |
|
||||
| darkStatusBarText | 是否是亮色主体文字,默认字体是黑色的,改成 true 后会认为 Modal 背景为暗色调,字体就会改成白色。 | `boolean` | `ALL` |
|
||||
| onShow | 在`Modal`显示时会执行此回调函数。 | `Function` | `ALL` |
|
||||
| onOrientationChange | 屏幕旋转方向改变时执行会回调 | `Function` | `ALL` |
|
||||
| darkStatusBarText | 是否是亮色主体文字,默认字体是黑色的,改成 true 后会认为 Modal 背景为暗色调,字体就会改成白色。 | `boolean` | `Android、iOS` |
|
||||
| onShow | 在`Modal`显示时会执行此回调函数。 | `Function` | `Android、iOS` |
|
||||
| onOrientationChange | 屏幕旋转方向改变时执行会回调 | `Function` | `Android、iOS` |
|
||||
| onRequestClose | 在 `Modal` 请求关闭时会执行此回调函数,一般时在 Android 系统里按下硬件返回按钮时触发,一般要在里面处理关闭弹窗。 | `Function` | `Android` |
|
||||
| transparent | 背景是否是透明的。`default: true` | `boolean` | `ALL` |
|
||||
| visible | 是否显示。`default: true` | `boolean` | `ALL` |
|
||||
| transparent | 背景是否是透明的。`default: true` | `boolean` | `Android、iOS` |
|
||||
| visible | 是否显示。`default: true` | `boolean` | `Android、iOS` |
|
||||
|
||||
---
|
||||
|
||||
@@ -183,9 +183,9 @@ import icon from './qb_icon_new.png';
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ---------- | ---------------------------------------------------- | ---------- | -------- |
|
||||
| onRefresh | 当`RefreshWrapper`执行刷新操作时,会触发到此回调函数 | `Function` | `ALL` |
|
||||
| getRefresh | 定义刷新栏的视图表现,返回 `View`, `Text` 等组件。 | `Function` | `ALL` |
|
||||
| bounceTime | 指定刷新条收回动画的时长,单位为ms | `number` | `ALL` |
|
||||
| onRefresh | 当`RefreshWrapper`执行刷新操作时,会触发到此回调函数 | `Function` | `Android、iOS` |
|
||||
| getRefresh | 定义刷新栏的视图表现,返回 `View`, `Text` 等组件。 | `Function` | `Android、iOS` |
|
||||
| bounceTime | 指定刷新条收回动画的时长,单位为ms | `number` | `Android、iOS` |
|
||||
|
||||
## 方法
|
||||
|
||||
@@ -215,17 +215,17 @@ import icon from './qb_icon_new.png';
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | -------- |
|
||||
| bounces | 是否开启回弹效果,默认 `true` | `boolean` | `iOS` |
|
||||
| contentContainerStyle | 这些样式会应用到一个内层的内容容器上,所有的子视图都会包裹在内容容器内。 | `StyleSheet` | `ALL` |
|
||||
| horizontal | 当此属性为 `true` 的时候,所有的子视图会在水平方向上排成一行,而不是默认的在垂直方向上排成一列 | `boolean` | `ALL` |
|
||||
| onMomentumScrollBegin | 在 `ScrollView` 滑动开始的时候调起。 | `Function` | `ALL` |
|
||||
| onMomentumScrollEnd | 在 `ScrollView` 滑动结束的时候调起。 | `Function` | `ALL` |
|
||||
| onScroll | 在滚动的过程中,每帧最多调用一次此回调函数。 | `Function` | `ALL` |
|
||||
| onScrollBeginDrag | 当用户开始拖拽 `ScrollView` 时调用。 | `Function` | `ALL` |
|
||||
| onScrollEndDrag | 当用户停止拖拽 `ScrollView` 或者放手让 `ScrollView` 开始滑动的时候调用。 | `Function` | `ALL` |
|
||||
| pagingEnabled | 当值为 `true` 时,滚动条会停在滚动视图的尺寸的整数倍位置。这个可以用在水平分页上。`default: false` | `boolean` | `ALL` |
|
||||
| scrollEventThrottle | 指定滑动事件的回调频率,传入数值指定了多少毫秒(ms)组件会调用一次 `onScroll` 回调事件。 | `number` | `ALL` |
|
||||
| scrollIndicatorInsets | 决定滚动条距离视图边缘的坐标。这个值应该和contentInset一样。 | `{ top: number, left: number, bottom: number, right: number }` | `ALL` |
|
||||
| scrollEnabled | 当值为 `false` 的时候,内容不能滚动。`default: true` | `boolean` | `ALL` |
|
||||
| contentContainerStyle | 这些样式会应用到一个内层的内容容器上,所有的子视图都会包裹在内容容器内。 | `StyleSheet` | `Android、iOS` |
|
||||
| horizontal | 当此属性为 `true` 的时候,所有的子视图会在水平方向上排成一行,而不是默认的在垂直方向上排成一列 | `boolean` | `Android、iOS` |
|
||||
| onMomentumScrollBegin | 在 `ScrollView` 滑动开始的时候调起。 | `Function` | `Android、iOS` |
|
||||
| onMomentumScrollEnd | 在 `ScrollView` 滑动结束的时候调起。 | `Function` | `Android、iOS` |
|
||||
| onScroll | 在滚动的过程中,每帧最多调用一次此回调函数。 | `Function` | `Android、iOS` |
|
||||
| onScrollBeginDrag | 当用户开始拖拽 `ScrollView` 时调用。 | `Function` | `Android、iOS` |
|
||||
| onScrollEndDrag | 当用户停止拖拽 `ScrollView` 或者放手让 `ScrollView` 开始滑动的时候调用。 | `Function` | `Android、iOS` |
|
||||
| pagingEnabled | 当值为 `true` 时,滚动条会停在滚动视图的尺寸的整数倍位置。这个可以用在水平分页上。`default: false` | `boolean` | `Android、iOS` |
|
||||
| scrollEventThrottle | 指定滑动事件的回调频率,传入数值指定了多少毫秒(ms)组件会调用一次 `onScroll` 回调事件。 | `number` | `Android、iOS` |
|
||||
| scrollIndicatorInsets | 决定滚动条距离视图边缘的坐标。这个值应该和contentInset一样。 | `{ top: number, left: number, bottom: number, right: number }` | `Android、iOS` |
|
||||
| scrollEnabled | 当值为 `false` 的时候,内容不能滚动。`default: true` | `boolean` | `Android、iOS` |
|
||||
| showScrollIndicator | 是否显示滚动条。 `default: false` | `boolean` | `Android` |
|
||||
| showsHorizontalScrollIndicator | 当此值设为 `false` 的时候,`ScrollView` 会隐藏水平的滚动条。`default: true` | `boolean` | `iOS` |
|
||||
| showsVerticalScrollIndicator | 当此值设为 `false` 的时候,`ScrollView` 会隐藏垂直的滚动条。 `default: true` | `boolean` | `iOS` |
|
||||
@@ -304,25 +304,25 @@ import icon from './qb_icon_new.png';
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| --------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | --------- |
|
||||
| caretColor | 输入光标颜色。(也可设置为 Style 属性) `最低支持版本2.11.5` | [`color`](style/color.md) | `Android` |
|
||||
| defaultValue | 提供一个文本框中的初始值。当用户开始输入的时候,值就可以改变。 在一些简单的使用情形下,如果你不想用监听消息然后更新 value 属性的方法来保持属性和状态同步的时候,就可以用 defaultValue 来代替。 | `string` | `ALL` |
|
||||
| editable | 如果为 false,文本框是不可编辑的。 `default: true` | `boolean` | `ALL` |
|
||||
| keyboardType | 决定弹出的何种软键盘的。 注意,`password`仅在属性 `multiline=false` 单行文本框时生效。 | `enum (default, numeric, password, email, phone-pad)` | `ALL` |
|
||||
| maxLength | 限制文本框中最多的字符数。使用这个属性而不用JS 逻辑去实现,可以避免闪烁的现象。 | `number` | `ALL` |
|
||||
| multiline | 如果为 `true` ,文本框中可以输入多行文字。 由于终端特性。 | `boolean` | `ALL` |
|
||||
| defaultValue | 提供一个文本框中的初始值。当用户开始输入的时候,值就可以改变。 在一些简单的使用情形下,如果你不想用监听消息然后更新 value 属性的方法来保持属性和状态同步的时候,就可以用 defaultValue 来代替。 | `string` | `Android、iOS` |
|
||||
| editable | 如果为 false,文本框是不可编辑的。 `default: true` | `boolean` | `Android、iOS` |
|
||||
| keyboardType | 决定弹出的何种软键盘的。 注意,`password`仅在属性 `multiline=false` 单行文本框时生效。 | `enum (default, numeric, password, email, phone-pad)` | `Android、iOS` |
|
||||
| maxLength | 限制文本框中最多的字符数。使用这个属性而不用JS 逻辑去实现,可以避免闪烁的现象。 | `number` | `Android、iOS` |
|
||||
| multiline | 如果为 `true` ,文本框中可以输入多行文字。 由于终端特性。 | `boolean` | `Android、iOS` |
|
||||
| numberOfLines | 设置 `TextInput` 最大显示行数,如果 `TextInput` 没有显式设置高度,会根据 `numberOfLines` 来计算高度撑开。在使用的时候必需同时设置 `multiline` 参数为 `true`。 | `number` | `Android` |
|
||||
| onBlur | 当文本框失去焦点的时候调用此回调函数。 | `Function` | `ALL` |
|
||||
| onChangeText | 当文本框内容变化时调用此回调函数。改变后的文字内容会作为参数传递。 | `Function` | `ALL` |
|
||||
| onKeyboardWillShow | 在弹出输入法键盘时候会触发此回调函数,返回值包含键盘高度 `keyboardHeight`,样式如 `{ keyboardHeight: 260 }`。 | `Function` | `ALL` |
|
||||
| onBlur | 当文本框失去焦点的时候调用此回调函数。 | `Function` | `Android、iOS` |
|
||||
| onChangeText | 当文本框内容变化时调用此回调函数。改变后的文字内容会作为参数传递。 | `Function` | `Android、iOS` |
|
||||
| onKeyboardWillShow | 在弹出输入法键盘时候会触发此回调函数,返回值包含键盘高度 `keyboardHeight`,样式如 `{ keyboardHeight: 260 }`。 | `Function` | `Android、iOS` |
|
||||
| onKeyboardWillHide | 在隐藏输入法键盘时候会触发此回调函数 | `Function` | `Android` |
|
||||
| onEndEditing | 当文本输入结束后调用此回调函数。 | `Function` | `ALL` |
|
||||
| onLayout | 当组件挂载或者布局变化的时候调用,参数为`nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置。 | `Function` | `ALL` |
|
||||
| onSelectionChange | 当输入框选择文字的范围被改变时调用。返回参数的样式如 `nativeEvent: { selection: { start, end } }`。 | `Function` | `ALL` |
|
||||
| placeholder | 如果没有任何文字输入,会显示此字符串。 | `string` | `ALL` |
|
||||
| placeholderTextColor | 占位字符串显示的文字颜色。(也可设置为 Style 属性)`最低支持版本2.13.4` | [`color`](style/color.md) | `ALL` |
|
||||
| returnKeyType | 指定软键盘的回车键显示的样式。 | `enum (done, go, next, search, send)` | `ALL` |
|
||||
| onEndEditing | 当文本输入结束后调用此回调函数。 | `Function` | `Android、iOS` |
|
||||
| onLayout | 当组件挂载或者布局变化的时候调用,参数为`nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置。 | `Function` | `Android、iOS` |
|
||||
| onSelectionChange | 当输入框选择文字的范围被改变时调用。返回参数的样式如 `nativeEvent: { selection: { start, end } }`。 | `Function` | `Android、iOS` |
|
||||
| placeholder | 如果没有任何文字输入,会显示此字符串。 | `string` | `Android、iOS` |
|
||||
| placeholderTextColor | 占位字符串显示的文字颜色。(也可设置为 Style 属性)`最低支持版本2.13.4` | [`color`](style/color.md) | `Android、iOS` |
|
||||
| returnKeyType | 指定软键盘的回车键显示的样式。 | `enum (done, go, next, search, send)` | `Android、iOS` |
|
||||
| underlineColorAndroid | `TextInput` 下底线的颜色。 可以设置为 'transparent' 来去掉下底线。(也可设置为 Style 属性) | [`color`](style/color.md) | `Android` |
|
||||
| value | 指定 `TextInput` 组件的值。 | `string` | `ALL` |
|
||||
| autoFocus | 组件渲染时自动获得焦点。 | `boolean` | `ALL` |
|
||||
| value | 指定 `TextInput` 组件的值。 | `string` | `Android、iOS` |
|
||||
| autoFocus | 组件渲染时自动获得焦点。 | `boolean` | `Android、iOS` |
|
||||
|
||||
## 方法
|
||||
|
||||
@@ -376,15 +376,15 @@ import icon from './qb_icon_new.png';
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| numberOfLines | 用来当文本过长的时候裁剪文本。包括折叠产生的换行在内,总的行数不会超过这个属性的限制。 | `number` | `ALL` |
|
||||
| opacity | 配置 `View` 的透明度,同时会影响子节点的透明度。 | `number` | `ALL` |
|
||||
| onLayout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置。 | `Function` | `ALL` |
|
||||
| onClick | 当文本被点击以后调用此回调函数。 例如, `onClick={() => console.log('onClick') }` | `Function` | `ALL` |
|
||||
| numberOfLines | 用来当文本过长的时候裁剪文本。包括折叠产生的换行在内,总的行数不会超过这个属性的限制。 | `number` | `Android、iOS` |
|
||||
| opacity | 配置 `View` 的透明度,同时会影响子节点的透明度。 | `number` | `Android、iOS` |
|
||||
| onLayout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置。 | `Function` | `Android、iOS` |
|
||||
| onClick | 当文本被点击以后调用此回调函数。 例如, `onClick={() => console.log('onClick') }` | `Function` | `Android、iOS` |
|
||||
| ellipsizeMode* | 当设定了 `numberOfLines` 值后,这个参数指定了字符串如何被截断。所以在使用 `ellipsizeMode` 时,必须得同时指定 `numberOfLines` 数值。 | `enum(head, middle, tail, clip)` | `Android 仅支持 tail 属性,iOS 全支持` |
|
||||
| onTouchDown | 当用户开始在控件上按下手指时,将回调此函数,并将触屏点信息作为参数传递进来; 参数为 `nativeEvent: { name, page_x, page_y, id }`, `page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置| `Function` | `ALL` |
|
||||
| onTouchMove | 当用户在控件移动手指时,此函数会持续收到回调,并通过event参数告知控件的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| onTouchEnd | 当触屏操作结束,用户在该控件上抬起手指时,此函数将被回调,event参数也会通知当前的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| onTouchCancel | 当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,触屏点信息也会通过event参数告知前端;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| onTouchDown | 当用户开始在控件上按下手指时,将回调此函数,并将触屏点信息作为参数传递进来; 参数为 `nativeEvent: { name, page_x, page_y, id }`, `page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置| `Function` | `Android、iOS` |
|
||||
| onTouchMove | 当用户在控件移动手指时,此函数会持续收到回调,并通过event参数告知控件的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| onTouchEnd | 当触屏操作结束,用户在该控件上抬起手指时,此函数将被回调,event参数也会通知当前的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| onTouchCancel | 当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,触屏点信息也会通过event参数告知前端;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
|
||||
* ellipsizeMode 的参数含义:
|
||||
* `clip` - 超过指定行数的文字会被直接截断,不显示“...”;(仅iOS支持)
|
||||
@@ -404,19 +404,19 @@ import icon from './qb_icon_new.png';
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------------ | ------------------------------------------------------------ | ------------------------------------ | --------- |
|
||||
| accessible | 当此属性为 `true` 时,表示此视图时一个启用了无障碍功能的元素。启用无障碍的其他属性时,必须优先设置 `accessible` 为 `true`。 | `boolean` | `ALL` |
|
||||
| accessibilityLabel | 设置当用户与此元素交互时,“读屏器”(对视力障碍人士的辅助功能)阅读的文字。默认情况下,这个文字会通过遍历所有的子元素并累加所有的文本标签来构建。 | `string` | `ALL` |
|
||||
| accessible | 当此属性为 `true` 时,表示此视图时一个启用了无障碍功能的元素。启用无障碍的其他属性时,必须优先设置 `accessible` 为 `true`。 | `boolean` | `Android、iOS` |
|
||||
| accessibilityLabel | 设置当用户与此元素交互时,“读屏器”(对视力障碍人士的辅助功能)阅读的文字。默认情况下,这个文字会通过遍历所有的子元素并累加所有的文本标签来构建。 | `string` | `Android、iOS` |
|
||||
| collapsable | Android 里如果一个 `View` 只用于布局它的子组件,则它可能会为了优化而从原生布局树中移除,因此该节点 DOM 的引用会丢失 `(比如调用 measureInAppWindow 无法获取到大小和位置信息)`。 把此属性设为 `false` 可以禁用这个优化,以确保对应视图在原生结构中存在。`(也可设置为 Style 属性)` | `boolean` | `Android` |
|
||||
| style | - | [`View Styles`](style/layout.md) | `ALL` |
|
||||
| opacity | 配置 `View` 的透明度,同时会影响子节点的透明度 | `number` | `ALL` |
|
||||
| overflow | 指定当子节点内容溢出其父级 `View` 容器时, 是否剪辑内容 | `enum(visible, hidden)` | `ALL` |
|
||||
| style | - | [`View Styles`](style/layout.md) | `Android、iOS` |
|
||||
| opacity | 配置 `View` 的透明度,同时会影响子节点的透明度 | `number` | `Android、iOS` |
|
||||
| overflow | 指定当子节点内容溢出其父级 `View` 容器时, 是否剪辑内容 | `enum(visible, hidden)` | `Android、iOS` |
|
||||
| nativeBackgroundAndroid | 配置水波纹效果,`最低支持版本 2.13.1`;配置项为 `{ borderless: boolean, color: Color, rippleRadius: number }`; `borderless` 表示波纹是否有边界,默认 false;`color` 波纹颜色;`rippleRadius` 波纹半径,若不设置,默认容器边框为边界; `注意:设置水波纹后默认不显示,需要在对应触摸事件中调用 setPressed 和 setHotspot 方法进行水波纹展示,详情参考相关`[demo](//github.com/Tencent/Hippy/tree/master/examples/hippy-react-demo/src/components/RippleViewAndroid/index.jsx) | `Object`| `Android` |
|
||||
| onLayout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置。 | `Function` | `ALL` |
|
||||
| onAttachedToWindow | 这个事件会在节点已经渲染并且添加到容器组件中触发,因为 Hippy 的渲染是异步的,这是很稳妥的执行后续操作的事件。 | `Function` | `ALL` |
|
||||
| onTouchDown | 当用户开始在控件上按下手指时,将回调此函数,并将触屏点信息作为参数传递进来; 参数为 `nativeEvent: { name, page_x, page_y, id }`, `page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置| `Function` | `ALL` |
|
||||
| onTouchMove | 当用户在控件移动手指时,此函数会持续收到回调,并通过event参数告知控件的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| onTouchEnd | 当触屏操作结束,用户在该控件上抬起手指时,此函数将被回调,event参数也会通知当前的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| onTouchCancel | 当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,触屏点信息也会通过event参数告知前端;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| onLayout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置。 | `Function` | `Android、iOS` |
|
||||
| onAttachedToWindow | 这个事件会在节点已经渲染并且添加到容器组件中触发,因为 Hippy 的渲染是异步的,这是很稳妥的执行后续操作的事件。 | `Function` | `Android、iOS` |
|
||||
| onTouchDown | 当用户开始在控件上按下手指时,将回调此函数,并将触屏点信息作为参数传递进来; 参数为 `nativeEvent: { name, page_x, page_y, id }`, `page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置| `Function` | `Android、iOS` |
|
||||
| onTouchMove | 当用户在控件移动手指时,此函数会持续收到回调,并通过event参数告知控件的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| onTouchEnd | 当触屏操作结束,用户在该控件上抬起手指时,此函数将被回调,event参数也会通知当前的触屏点信息;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| onTouchCancel | 当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,触屏点信息也会通过event参数告知前端;参数为 `nativeEvent: { name, page_x, page_y, id }`,`page_x` 和 `page_y` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
|
||||
|
||||
## 方法
|
||||
@@ -452,11 +452,11 @@ import icon from './qb_icon_new.png';
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------------------ | ------------------------------------------------------------ | -------------------------------------------- | -------- |
|
||||
| bounces | 是否开启回弹效果,默认 `true` | `boolean` | `iOS` |
|
||||
| initialPage | 指定一个数字,用于决定初始化后默认显示的页面 index,默认不指定的时候是0 | `number` | `ALL` |
|
||||
| scrollEnabled | 指定 ViewPager 是否可以滑动,默认为 `true` | `boolean` | `ALL` |
|
||||
| onPageSelected | 指定一个函数,当 page 被选中时进行回调。回调参数是一个 event 对象,回调参数: `position: number` - 表示即将滑到的目标 page 的索引 | `(obj: {position: number}) => void` | `ALL` |
|
||||
| onPageScroll | 指定一个函数,当 page 被滑动时进行回调。回调参数是一个 event 对象,回调参数 `position: number` - 表示即将滑到的目标 page 的索引,`offset: number` - 当前被选中的 page 的相对位移,取值范围 -1 到 1 | `(obj: {position: number, offset: number}) => void` | `ALL` |
|
||||
| onPageScrollStateChanged | 指定一个函数,当 page 的滑动状态改变时进行回调。回调参数: `pageScrollState: string` - 改变后的状态,`idle` 表示停止,`dragging` 表示用户用手拖拽,`settling` 表示 page 正在滑动 | `(pageScrollState: string) => void` | `ALL` |
|
||||
| initialPage | 指定一个数字,用于决定初始化后默认显示的页面 index,默认不指定的时候是0 | `number` | `Android、iOS` |
|
||||
| scrollEnabled | 指定 ViewPager 是否可以滑动,默认为 `true` | `boolean` | `Android、iOS` |
|
||||
| onPageSelected | 指定一个函数,当 page 被选中时进行回调。回调参数是一个 event 对象,回调参数: `position: number` - 表示即将滑到的目标 page 的索引 | `(obj: {position: number}) => void` | `Android、iOS` |
|
||||
| onPageScroll | 指定一个函数,当 page 被滑动时进行回调。回调参数是一个 event 对象,回调参数 `position: number` - 表示即将滑到的目标 page 的索引,`offset: number` - 当前被选中的 page 的相对位移,取值范围 -1 到 1 | `(obj: {position: number, offset: number}) => void` | `Android、iOS` |
|
||||
| onPageScrollStateChanged | 指定一个函数,当 page 的滑动状态改变时进行回调。回调参数: `pageScrollState: string` - 改变后的状态,`idle` 表示停止,`dragging` 表示用户用手拖拽,`settling` 表示 page 正在滑动 | `(pageScrollState: string) => void` | `Android、iOS` |
|
||||
| direction | 设置 viewPager 滚动方向,不设置默认横向滚动,设置 `vertical` 为竖向滚动 | `string` | `Android` |
|
||||
|
||||
## 方法
|
||||
@@ -486,24 +486,24 @@ import icon from './qb_icon_new.png';
|
||||
## 参数
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| --------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | -------- |
|
||||
| numberOfColumns | 瀑布流列数量 , Default: 2 | `number` | `ALL` |
|
||||
| numberOfItems | 瀑布流 item 总个数 | `number` | `ALL`|
|
||||
| columnSpacing | 瀑布流每列之前的水平间距 | `number` | `ALL` |
|
||||
| interItemSpacing | item 间的垂直间距 | `number` | `ALL` |
|
||||
| contentInset | 内容缩进 ,默认值 `{ top:0, left:0, bottom:0, right:0 }` | `Object` | `ALL` |
|
||||
| renderItem | 这里的入参是当前 item 的 index,在这里可以凭借 index 获取到瀑布流一个具体单元格的数据,从而决定如何渲染这个单元格。 | `(index: number) => React.ReactElement` | `ALL` |
|
||||
| --------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | ------------------ |
|
||||
| numberOfColumns | 瀑布流列数量 , `Default: 2` | `number` | `Android、iOS` |
|
||||
| numberOfItems | 瀑布流 item 总个数 | `number` | `Android、iOS`|
|
||||
| columnSpacing | 瀑布流每列之前的水平间距 | `number` | `Android、iOS` |
|
||||
| interItemSpacing | item 间的垂直间距 | `number` | `Android、iOS` |
|
||||
| contentInset | 内容缩进 ,默认值 `{ top:0, left:0, bottom:0, right:0 }` | `Object` | `Android、iOS` |
|
||||
| renderItem | 这里的入参是当前 item 的 index,在这里可以凭借 index 获取到瀑布流一个具体单元格的数据,从而决定如何渲染这个单元格。 | `(index: number) => React.ReactElement` | `Android、iOS` |
|
||||
| renderBanner | 如何渲染 Banner。 | `() => React.ReactElement` | `iOS`
|
||||
| getItemStyle | 设置`WaterfallItem`容器的样式。 | `(index: number) => styleObject` | `ALL` |
|
||||
| getItemType | 指定一个函数,在其中返回对应条目的类型(返回Number类型的自然数,默认是0),List 将对同类型条目进行复用,所以合理的类型拆分,可以很好地提升list 性能。 | `(index: number) => number` | `ALL` |
|
||||
| getItemKey | 指定一个函数,在其中返回对应条目的 Key 值,详见 [React 官文](//reactjs.org/docs/lists-and-keys.html) | `(index: number) => any` | `ALL` |
|
||||
| preloadItemNumber | 滑动到瀑布流底部前提前预加载的 item 数量 | `number` | `ALL` |
|
||||
| onEndReached | 当所有的数据都已经渲染过,并且列表被滚动到最后一条时,将触发 `onEndReached` 回调。 | `Function` | `ALL` |
|
||||
| getItemStyle | 设置`WaterfallItem`容器的样式。 | `(index: number) => styleObject` | `Android、iOS` |
|
||||
| getItemType | 指定一个函数,在其中返回对应条目的类型(返回Number类型的自然数,默认是0),List 将对同类型条目进行复用,所以合理的类型拆分,可以很好地提升list 性能。 | `(index: number) => number` | `Android、iOS` |
|
||||
| getItemKey | 指定一个函数,在其中返回对应条目的 Key 值,详见 [React 官文](//reactjs.org/docs/lists-and-keys.html) | `(index: number) => any` | `Android、iOS` |
|
||||
| preloadItemNumber | 滑动到瀑布流底部前提前预加载的 item 数量 | `number` | `Android、iOS` |
|
||||
| onEndReached | 当所有的数据都已经渲染过,并且列表被滚动到最后一条时,将触发 `onEndReached` 回调。 | `Function` | `Android、iOS` |
|
||||
| containPullHeader | 是否包含`PullHeader`组件,默认 `false` ;`Android` 暂不支持,可暂时用 `RefreshWrapper` 组件替代 | `boolean` | `iOS` |
|
||||
| renderPullHeader | 如何渲染 `PullHeader`,此时 `containPullHeader` 默认设置成 `true` | `() => React.ReactElement` | `iOS` |
|
||||
| containPullFooter | 是否包含`PullFooter`组件,默认 `false` | `boolean` | `ALL` |
|
||||
| renderPullFooter | 如何渲染 `PullFooter`,此时 `containPullFooter` 默认设置成 `true` | `() => React.ReactElement` | `ALL` |
|
||||
| onScroll | 当触发 `WaterFall` 的滑动事件时回调。`startEdgePos`表示距离 List 顶部边缘滚动偏移量;`endEdgePos`表示距离 List 底部边缘滚动偏移量;`firstVisibleRowIndex`表示当前可见区域内第一个元素的索引;`lastVisibleRowIndex`表示当前可见区域内最后一个元素的索引;`visibleRowFrames`表示当前可见区域内所有 item 的信息(x,y,width,height) | `nativeEvent: { startEdgePos: number, endEdgePos: number, firstVisibleRowIndex: number, lastVisibleRowIndex: number, visibleRowFrames: Object[] }` | `ALL`
|
||||
| containPullFooter | 是否包含`PullFooter`组件,默认 `false` | `boolean` | `Android、iOS` |
|
||||
| renderPullFooter | 如何渲染 `PullFooter`,此时 `containPullFooter` 默认设置成 `true` | `() => React.ReactElement` | `Android、iOS` |
|
||||
| onScroll | 当触发 `WaterFall` 的滑动事件时回调。`startEdgePos`表示距离 List 顶部边缘滚动偏移量;`endEdgePos`表示距离 List 底部边缘滚动偏移量;`firstVisibleRowIndex`表示当前可见区域内第一个元素的索引;`lastVisibleRowIndex`表示当前可见区域内最后一个元素的索引;`visibleRowFrames`表示当前可见区域内所有 item 的信息(x,y,width,height) | `nativeEvent: { startEdgePos: number, endEdgePos: number, firstVisibleRowIndex: number, lastVisibleRowIndex: number, visibleRowFrames: Object[] }` | `Android、iOS`
|
||||
|
||||
## 方法
|
||||
|
||||
@@ -534,10 +534,10 @@ WebView组件。
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| --------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | -------- |
|
||||
| source | Webview 内嵌地址 | `{ uri: string }` | `ALL` |
|
||||
| userAgent | Webview userAgent | `string` | `ALL`|
|
||||
| method | 请求方式, `get`、`post` | `string` | `ALL` |
|
||||
| onLoadStart | 网页开始加载时触发 | `(object: { url:string }) => void` | `ALL` |
|
||||
| onLoad | 网页加载时触发 | `(object: { url:string }) => void` | `ALL` |
|
||||
| onLoadEnd | 网页加载结束时触发 | `(object: { url:string }) => void` | `ALL` |
|
||||
| style | Webview 容器样式 | `Object` | `ALL` |
|
||||
| source | Webview 内嵌地址 | `{ uri: string }` | `Android、iOS` |
|
||||
| userAgent | Webview userAgent | `string` | `Android、iOS`|
|
||||
| method | 请求方式, `get`、`post` | `string` | `Android、iOS` |
|
||||
| onLoadStart | 网页开始加载时触发 | `(object: { url:string }) => void` | `Android、iOS` |
|
||||
| onLoad | 网页加载时触发 | `(object: { url:string }) => void` | `Android、iOS` |
|
||||
| onLoadEnd | 网页加载结束时触发 | `(object: { url:string }) => void` | `Android、iOS` |
|
||||
| style | Webview 容器样式 | `Object` | `Android、iOS` |
|
||||
|
||||
@@ -400,8 +400,8 @@ AsyncStorage 是一个简单的、异步的、持久化的 Key-Value 存储系
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------ | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------- |
|
||||
| OS | 用来判断是在 iOS 或者 Android 下 | `string` | `ALL` |
|
||||
| Localization | 输出国际化相关信息, `最低支持版本 2.8.0` | `object: { country: string , language: string, direction: number }`, 其中 `direction` 为 0 表示 LTR 方向,1 表示 RTL 方向 | `ALL` |
|
||||
| OS | 用来判断是在 iOS 或者 Android 下 | `string` | `Android、iOS` |
|
||||
| Localization | 输出国际化相关信息, `最低支持版本 2.8.0` | `object: { country: string , language: string, direction: number }`, 其中 `direction` 为 0 表示 LTR 方向,1 表示 RTL 方向 | `Android、iOS` |
|
||||
|
||||
---
|
||||
|
||||
@@ -413,7 +413,7 @@ AsyncStorage 是一个简单的、异步的、持久化的 Key-Value 存储系
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
|
||||
| hairlineWidth | 这一常量定义了当前平台上的最细的宽度。可以用作边框或是两个元素间的分隔线。然而,你不应该信任它作为一个衡量长度的单位,因为在不同机器与不同分辨率,hairlineWidth 可能会表现不同。 | `number` | `ALL` |
|
||||
| hairlineWidth | 这一常量定义了当前平台上的最细的宽度。可以用作边框或是两个元素间的分隔线。然而,你不应该信任它作为一个衡量长度的单位,因为在不同机器与不同分辨率,hairlineWidth 可能会表现不同。 | `number` | `Android、iOS` |
|
||||
|
||||
## 方法
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
|
||||
---
|
||||
|
||||
@@ -31,12 +31,12 @@
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| click | 当按钮被点击以后调用此回调函数。 例如, `@click="clickHandler"` | `Function` | `ALL` |
|
||||
| longClick | 当按钮被长按以后调用此回调函数。 例如, `@longClick="longClickHandler"}` | `Function` | `ALL` |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| click | 当按钮被点击以后调用此回调函数。 例如, `@click="clickHandler"` | `Function` | `Android、iOS` |
|
||||
| longClick | 当按钮被长按以后调用此回调函数。 例如, `@longClick="longClickHandler"}` | `Function` | `Android、iOS` |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
|
||||
---
|
||||
|
||||
@@ -50,17 +50,17 @@
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------------ | ------------------------------------------------------------ | ------------------------------------ | --------- |
|
||||
| accessibilityLabel | 设置当用户与此元素交互时,“读屏器”(对视力障碍人士的辅助功能)阅读的文字。默认情况下,这个文字会通过遍历所有的子元素并累加所有的文本标签来构建。 | `string` | `ALL` |
|
||||
| accessible | 当此属性为 `true` 时,表示此视图时一个启用了无障碍功能的元素。默认情况下,所有可触摸操作的元素都是无障碍功能元素。 | `boolean` | `ALL` |
|
||||
| accessibilityLabel | 设置当用户与此元素交互时,“读屏器”(对视力障碍人士的辅助功能)阅读的文字。默认情况下,这个文字会通过遍历所有的子元素并累加所有的文本标签来构建。 | `string` | `Android、iOS` |
|
||||
| accessible | 当此属性为 `true` 时,表示此视图时一个启用了无障碍功能的元素。默认情况下,所有可触摸操作的元素都是无障碍功能元素。 | `boolean` | `Android、iOS` |
|
||||
| collapsable | 如果一个 `div` 只用于布局它的子组件,则它可能会为了优化而从原生布局树中移除,因此该节点 DOM 的引用会丢失`(比如调用 measureInAppWindow 无法获取到大小和位置信息)`。 把此属性设为 `false` 可以禁用这个优化,以确保对应视图在原生结构中存在。`(也可设置为 Style 属性)` | `boolean` | `Android` |
|
||||
| style | - | [`View Styles`](style/layout.md) | `ALL` |
|
||||
| opacity | 配置 `View` 的透明度,同时会影响子节点的透明度 | `number` | `ALL` |
|
||||
| overflow | 指定当子节点内容溢出其父级 `View` 容器时, 是否剪辑内容 | `enum(visible, hidden)` | `ALL` |
|
||||
| style | - | [`View Styles`](style/layout.md) | `Android、iOS` |
|
||||
| opacity | 配置 `View` 的透明度,同时会影响子节点的透明度 | `number` | `Android、iOS` |
|
||||
| overflow | 指定当子节点内容溢出其父级 `View` 容器时, 是否剪辑内容 | `enum(visible, hidden)` | `Android、iOS` |
|
||||
| focusable | 允许使用遥控器触发 View 的激活状态,改为 true 后使用遥控器将能触发 div 的 `@focus` 事件,需要通过 `nextFocusDownId`、`nextFocusUpId`、`nextFocusLeftId`、`nextFocusRightId` 参数指明四个方向键将移动到的的节点 ID | `boolean` | `Android` |
|
||||
| scrollEventThrottle | 指定滑动事件的回调频率,传入数值指定了多少毫秒(ms)组件会调用一次 `onScroll` 回调事件。`(仅在 overflow-y/x: scroll 时适用)` | `number` | `ALL` |
|
||||
| pagingEnabled | 当值为 `true` 时,滚动条会停在滚动视图的尺寸的整数倍位置。这个可以用在水平分页上。`default: false` `(仅在 overflow-y/x: scroll 时适用)` | `boolean` | `ALL` |
|
||||
| scrollEventThrottle | 指定滑动事件的回调频率,传入数值指定了多少毫秒(ms)组件会调用一次 `onScroll` 回调事件。`(仅在 overflow-y/x: scroll 时适用)` | `number` | `Android、iOS` |
|
||||
| pagingEnabled | 当值为 `true` 时,滚动条会停在滚动视图的尺寸的整数倍位置。这个可以用在水平分页上。`default: false` `(仅在 overflow-y/x: scroll 时适用)` | `boolean` | `Android、iOS` |
|
||||
| bounces | 是否开启回弹效果,默认 `true` `(仅在 overflow-y/x: scroll 时适用)` | `boolean` | `iOS` |
|
||||
| scrollEnabled | 当值为 `false` 的时候,内容不能滚动。`default: true` `(仅在 overflow-y/x: scroll 时适用)` | `boolean` | `ALL` |
|
||||
| scrollEnabled | 当值为 `false` 的时候,内容不能滚动。`default: true` `(仅在 overflow-y/x: scroll 时适用)` | `boolean` | `Android、iOS` |
|
||||
| showScrollIndicator | 是否显示滚动条。 `default: false`(仅在 overflow-y/x: scroll 时适用) | `boolean` | `Android` |
|
||||
| showsHorizontalScrollIndicator | 当此值设为 `false` 的时候,`ScrollView` 会隐藏水平的滚动条。`default: true` `(仅在 overflow-y/x: scroll 时适用)`| `boolean` | `iOS` |
|
||||
| showsVerticalScrollIndicator | 当此值设为 `false` 的时候,`ScrollView` 会隐藏垂直的滚动条。 `default: true` `(仅在 overflow-y/x: scroll 时适用)`| `boolean` | `iOS` |
|
||||
@@ -72,20 +72,20 @@
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| attachedToWindow | 这个事件会在节点已经渲染并且添加到容器组件中触发,因为 Hippy 的渲染是异步的,这是很稳妥的执行后续操作的事件。 | `Function` | `ALL` |
|
||||
| click | 当按钮被点击以后调用此回调函数。 例如, `@click="clickHandler"` | `Function` | `ALL` |
|
||||
| attachedToWindow | 这个事件会在节点已经渲染并且添加到容器组件中触发,因为 Hippy 的渲染是异步的,这是很稳妥的执行后续操作的事件。 | `Function` | `Android、iOS` |
|
||||
| click | 当按钮被点击以后调用此回调函数。 例如, `@click="clickHandler"` | `Function` | `Android、iOS` |
|
||||
| focus | 该事件在 `focusable` 置为 true 时触发,通过遥控方向键可以移动活动组件位置,事件回调带有 `isFocused` 参数用于标记激活和非激活状态 | `Function` | `Android` |
|
||||
| longClick | 当按钮被长按以后调用此回调函数。 例如, `@longClick="longClickHandler"}` | `Function` | `ALL` |
|
||||
| layout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置 | `Function` | `ALL` |
|
||||
| momentumScrollBegin | 在 ScrollView 滑动开始的时候调起。`(仅在 overflow-y/x: scroll 时适用)` | `Function` | `ALL` |
|
||||
| momentumScrollEnd | 在 ScrollView 滑动结束的时候调起。`(仅在 overflow-y/x: scroll 时适用)` | `Function` | `ALL` |
|
||||
| scroll | 在滚动的过程中,每帧最多调用一次此回调函数。`(仅在 overflow-y/x: scroll 时适用)` | `Function` | `ALL` |
|
||||
| scrollBeginDrag | 当用户开始拖拽 ScrollView 时调用。`(仅在 overflow-y/x: scroll 时适用)` | `Function` | `ALL` |
|
||||
| scrollEndDrag | 当用户停止拖拽 ScrollView 时调用。`(仅在 overflow-y/x: scroll 时适用)` | `Function` | `ALL` |
|
||||
| touchstart | 触屏开始事件,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchmove | 触屏移动事件,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchend | 触屏结束事件,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| longClick | 当按钮被长按以后调用此回调函数。 例如, `@longClick="longClickHandler"}` | `Function` | `Android、iOS` |
|
||||
| layout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置 | `Function` | `Android、iOS` |
|
||||
| momentumScrollBegin | 在 ScrollView 滑动开始的时候调起。`(仅在 overflow-y/x: scroll 时适用)` | `Function` | `Android、iOS` |
|
||||
| momentumScrollEnd | 在 ScrollView 滑动结束的时候调起。`(仅在 overflow-y/x: scroll 时适用)` | `Function` | `Android、iOS` |
|
||||
| scroll | 在滚动的过程中,每帧最多调用一次此回调函数。`(仅在 overflow-y/x: scroll 时适用)` | `Function` | `Android、iOS` |
|
||||
| scrollBeginDrag | 当用户开始拖拽 ScrollView 时调用。`(仅在 overflow-y/x: scroll 时适用)` | `Function` | `Android、iOS` |
|
||||
| scrollEndDrag | 当用户停止拖拽 ScrollView 时调用。`(仅在 overflow-y/x: scroll 时适用)` | `Function` | `Android、iOS` |
|
||||
| touchstart | 触屏开始事件,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchmove | 触屏移动事件,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchend | 触屏结束事件,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
|
||||
## 方法
|
||||
|
||||
@@ -138,17 +138,17 @@
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------------ | ------------------------------------------------------------ | ------------------------------------ | --------- |
|
||||
| src | 内嵌用的网址 | `string` | `ALL` |
|
||||
| method | 请求方式,`get`、`post` | `string` | `ALL` |
|
||||
| userAgent | Webview userAgent | `string` | `ALL`|
|
||||
| src | 内嵌用的网址 | `string` | `Android、iOS` |
|
||||
| method | 请求方式,`get`、`post` | `string` | `Android、iOS` |
|
||||
| userAgent | Webview userAgent | `string` | `Android、iOS`|
|
||||
|
||||
## 事件
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| load | 网页加载成功后会触发 | `(object: { url:string }) => void` | `ALL` |
|
||||
| loadStart | 网页开始加载时触发 | `(object: { url:string }) => void` | `ALL` |
|
||||
| loadEnd | 网页加载结束时触发 | `(object: { url:string }) => void` | `ALL` |
|
||||
| load | 网页加载成功后会触发 | `(object: { url:string }) => void` | `Android、iOS` |
|
||||
| loadStart | 网页开始加载时触发 | `(object: { url:string }) => void` | `Android、iOS` |
|
||||
| loadEnd | 网页加载结束时触发 | `(object: { url:string }) => void` | `Android、iOS` |
|
||||
|
||||
---
|
||||
|
||||
@@ -165,30 +165,30 @@
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| src | 图片地址。现在支持的图片格式有 png , jpg , jpeg , bmp , gif 。 | string | `ALL` |
|
||||
| capInsets | 当调整 img 大小的时候,由 capInsets 指定的边角尺寸会被固定而不进行缩放,而中间和边上其他的部分则会被拉伸。这在制作一些可变大小的圆角按钮、阴影、以及其它资源的时候非常有用。 | `{ top: number, left: number, bottom: number, right: number }` | `ALL` |
|
||||
| src | 图片地址。现在支持的图片格式有 png , jpg , jpeg , bmp , gif 。 | string | `Android、iOS` |
|
||||
| capInsets | 当调整 img 大小的时候,由 capInsets 指定的边角尺寸会被固定而不进行缩放,而中间和边上其他的部分则会被拉伸。这在制作一些可变大小的圆角按钮、阴影、以及其它资源的时候非常有用。 | `{ top: number, left: number, bottom: number, right: number }` | `Android、iOS` |
|
||||
> `2.8.1` 版本后支持终端本地图片能力,可通过 webpack `file-loader` 加载。
|
||||
|
||||
## 样式内特殊属性
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------------ | ------------------------------------------------------------ | ------------------------------------ | --------- |
|
||||
| resize-mode | 决定当组件尺寸和图片尺寸不成比例的时候如何调整图片的大小。 | `enum (cover, contain, stretch, repeat, center)` | `ALL` |
|
||||
| resize-mode | 决定当组件尺寸和图片尺寸不成比例的时候如何调整图片的大小。 | `enum (cover, contain, stretch, repeat, center)` | `Android、iOS` |
|
||||
|
||||
## 事件
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| layout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置 | `Function` | `ALL` |
|
||||
| load | 加载成功完成时调用此回调函数。 | `Function` | `ALL` |
|
||||
| loadStart | 加载开始时调用。 | `Function` | `ALL` |
|
||||
| loadEnd | 加载结束后,不论成功还是失败,调用此回调函数。 | `Function` | `ALL` |
|
||||
| error | 当加载错误的时候调用此回调函数。| `Function` | `ALL` |
|
||||
| layout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置 | `Function` | `Android、iOS` |
|
||||
| load | 加载成功完成时调用此回调函数。 | `Function` | `Android、iOS` |
|
||||
| loadStart | 加载开始时调用。 | `Function` | `Android、iOS` |
|
||||
| loadEnd | 加载结束后,不论成功还是失败,调用此回调函数。 | `Function` | `Android、iOS` |
|
||||
| error | 当加载错误的时候调用此回调函数。| `Function` | `Android、iOS` |
|
||||
| progress | 在加载过程中不断调用,参数为 `nativeEvent: { loaded: number, total: number }`, `loaded` 表示加载中的图片大小, `total` 表示图片总大小 | `Function` | `iOS` |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
|
||||
---
|
||||
|
||||
@@ -246,28 +246,28 @@
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| --------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | --------- |
|
||||
| caret-color | 输入光标颜色。(也可设置为 Style 属性) `最低支持版本2.11.5` | [`color`](style/color.md) | `Android` |
|
||||
| defaultValue | 提供一个文本框中的初始值。当用户开始输入的时候,值就可以改变。 在一些简单的使用情形下,如果你不想用监听消息然后更新 value 属性的方法来保持属性和状态同步的时候,就可以用 defaultValue 来代替。 | `string` | `ALL` |
|
||||
| editable | 如果为 false,文本框是不可编辑的。`default: true` | `boolean` | `ALL` |
|
||||
| type | 决定弹出的何种软键盘的。 注意,`password`仅在属性 `multiline=false` 单行文本框时生效。 | `enum(default, numeric, password, email, phone-pad)` | `ALL` |
|
||||
| maxlength | 限制文本框中最多的字符数。使用这个属性而不用JS 逻辑去实现,可以避免闪烁的现象。 | `numbers` | `ALL` |
|
||||
| defaultValue | 提供一个文本框中的初始值。当用户开始输入的时候,值就可以改变。 在一些简单的使用情形下,如果你不想用监听消息然后更新 value 属性的方法来保持属性和状态同步的时候,就可以用 defaultValue 来代替。 | `string` | `Android、iOS` |
|
||||
| editable | 如果为 false,文本框是不可编辑的。`default: true` | `boolean` | `Android、iOS` |
|
||||
| type | 决定弹出的何种软键盘的。 注意,`password`仅在属性 `multiline=false` 单行文本框时生效。 | `enum(default, numeric, password, email, phone-pad)` | `Android、iOS` |
|
||||
| maxlength | 限制文本框中最多的字符数。使用这个属性而不用JS 逻辑去实现,可以避免闪烁的现象。 | `numbers` | `Android、iOS` |
|
||||
| numberOfLines | 设置 `input` 最大显示行数,如果 `input` 没有显式设置高度,会根据 `numberOfLines` 来计算高度撑开。在使用的时候必需同时设置 `multiline` 参数为 `true`。 | `number` | `Android` |
|
||||
| placeholder | 如果没有任何文字输入,会显示此字符串。 | `string` | `ALL` |
|
||||
| placeholder-text-color | 占位字符串显示的文字颜色。(也可设置为 Style 属性) `最低支持版本2.13.4` | [`color`](style/color.md) | `ALL` |
|
||||
| placeholder | 如果没有任何文字输入,会显示此字符串。 | `string` | `Android、iOS` |
|
||||
| placeholder-text-color | 占位字符串显示的文字颜色。(也可设置为 Style 属性) `最低支持版本2.13.4` | [`color`](style/color.md) | `Android、iOS` |
|
||||
| underline-color-android | `input` 下底线的颜色。 可以设置为 'transparent' 来去掉下底线。(也可设置为 Style 属性) `最低支持版本2.13.4` | [`color`](style/color.md) | `Android` |
|
||||
| returnKeyType | 指定软键盘的回车键显示的样式。 | `enum(done, go, next, search, send)` | `ALL` |
|
||||
| value | 指定 `input` 组件的值。 | `string` | `ALL` |
|
||||
| returnKeyType | 指定软键盘的回车键显示的样式。 | `enum(done, go, next, search, send)` | `Android、iOS` |
|
||||
| value | 指定 `input` 组件的值。 | `string` | `Android、iOS` |
|
||||
|
||||
## 事件
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| blur | 当文本框失去焦点的时候调用此回调函数。 | `Function` | `ALL` |
|
||||
| change | 当文本框内容变化时调用此回调函数。改变后的文字内容会作为参数传递。 | `Function` | `ALL` |
|
||||
| keyboardWillShow | 在弹出输入法键盘时候会触发此回调函数,返回值包含键盘高度 `keyboardHeight`,样式如 `{ keyboardHeight: 260 }`。 | `Function` | `ALL` |
|
||||
| blur | 当文本框失去焦点的时候调用此回调函数。 | `Function` | `Android、iOS` |
|
||||
| change | 当文本框内容变化时调用此回调函数。改变后的文字内容会作为参数传递。 | `Function` | `Android、iOS` |
|
||||
| keyboardWillShow | 在弹出输入法键盘时候会触发此回调函数,返回值包含键盘高度 `keyboardHeight`,样式如 `{ keyboardHeight: 260 }`。 | `Function` | `Android、iOS` |
|
||||
| keyboardWillHide | 在隐藏输入法键盘时候会触发此回调函数 | `Function` | `Android` |
|
||||
| endEditing | 当文本输入结束后调用此回调函数。 | `Function` | `ALL` |
|
||||
| layout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置。 | `Function` | `ALL` |
|
||||
| selectionChange | 当输入框选择文字的范围被改变时调用。返回参数的样式如 `{ nativeEvent: { selection: { start, end } } }`。 | `Function` | `ALL` |
|
||||
| endEditing | 当文本输入结束后调用此回调函数。 | `Function` | `Android、iOS` |
|
||||
| layout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置。 | `Function` | `Android、iOS` |
|
||||
| selectionChange | 当输入框选择文字的范围被改变时调用。返回参数的样式如 `{ nativeEvent: { selection: { start, end } } }`。 | `Function` | `Android、iOS` |
|
||||
|
||||
## 方法
|
||||
|
||||
@@ -305,10 +305,10 @@
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
|
||||
---
|
||||
|
||||
@@ -323,16 +323,16 @@ Hippy 的重点功能,高性能的可复用列表组件,在终端侧会被
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| --------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | -------- |
|
||||
| horizontal | 指定 `ul` 是否采用横向布局。`default: undefined` | `any` | `Android` |
|
||||
| initialContentOffset | 初始位移值。在列表初始化时即可指定滚动距离,避免初始化后再通过 scrollTo 系列方法产生的闪动。Android 在 `2.8.0` 版本后支持 | `number` | `ALL` |
|
||||
| initialContentOffset | 初始位移值。在列表初始化时即可指定滚动距离,避免初始化后再通过 scrollTo 系列方法产生的闪动。Android 在 `2.8.0` 版本后支持 | `number` | `Android、iOS` |
|
||||
| bounces | 是否开启回弹效果,默认 `true` | `boolean` | `iOS` |
|
||||
| overScrollEnabled | 是否开启回弹效果,默认 `true` | `boolean` | `Android` |
|
||||
| rowShouldSticky | 设置 `ul` 是否需要开启悬停效果能力,与 `li` 的 `sticky` 配合使用。 `default: false` | `boolean` | `ALL`
|
||||
| scrollEnabled | 滑动是否开启。`default: true` | `boolean` | `All` |
|
||||
| scrollEventThrottle | 指定滑动事件的回调频率,传入数值指定了多少毫秒(ms)组件会调用一次 `onScroll` 回调事件,默认 200ms | `number` | `ALL` |
|
||||
| rowShouldSticky | 设置 `ul` 是否需要开启悬停效果能力,与 `li` 的 `sticky` 配合使用。 `default: false` | `boolean` | `Android、iOS`
|
||||
| scrollEnabled | 滑动是否开启。`default: true` | `boolean` | `Android、iOS` |
|
||||
| scrollEventThrottle | 指定滑动事件的回调频率,传入数值指定了多少毫秒(ms)组件会调用一次 `onScroll` 回调事件,默认 200ms | `number` | `Android、iOS` |
|
||||
| showScrollIndicator | 是否显示滚动条。`default: true` | `boolean` | `iOS` |
|
||||
| preloadItemNumber | 指定当列表滚动至倒数第几行时触发 `endReached` 回调。 | `number` | `ALL` |
|
||||
| preloadItemNumber | 指定当列表滚动至倒数第几行时触发 `endReached` 回调。 | `number` | `Android、iOS` |
|
||||
| exposureEventEnabled | Android 曝光能力启用开关,如果要使用 `appear`、`disappear` 相关事件,Android 需要设置该开关(iOS无需设置), `default: true` | `boolean` | `Android`
|
||||
| endReached | 当所有的数据都已经渲染过,并且列表被滚动到最后一条时,将触发 `endReached` 回调。 | `Function` | `ALL` |
|
||||
| endReached | 当所有的数据都已经渲染过,并且列表被滚动到最后一条时,将触发 `endReached` 回调。 | `Function` | `Android、iOS` |
|
||||
| editable | 是否可编辑,开启侧滑删除时需要设置为 `true`。`最低支持版本2.9.0` | `boolean` | `iOS` |
|
||||
| delText | 侧滑删除文本。`最低支持版本2.9.0` | `string` | `iOS` |
|
||||
|
||||
@@ -340,13 +340,13 @@ Hippy 的重点功能,高性能的可复用列表组件,在终端侧会被
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| endReached | 当所有的数据都已经渲染过,并且列表被滚动到最后一条时,将触发 `onEndReached` 回调。 | `Function` | `ALL` |
|
||||
| momentumScrollBegin | 在 `ListView` 开始滑动的时候调起 | `Function` | `ALL` |
|
||||
| momentumScrollEnd | 在 `ListView` 结束滑动的时候调起 | `Function` | `ALL` |
|
||||
| scroll | 当触发 `ListView` 的滑动事件时回调。由于在 `ListView` 滑动时回调,调用会非常频繁,请使用 `scrollEventThrottle` 进行频率控制。 注意:ListView 在滚动时会进行组件回收,不要在滚动时对 renderRow() 生成的 ListItemView 做任何 ref 节点级的操作(例如:所有 callUIFunction 和 measureInAppWindow 方法),回收后的节点将无法再进行操作而报错。横向ListView时,Android在 `2.8.0` 版本后支持 | `(obj: { contentOffset: { x: number, y: number } }) => any` | `ALL` |
|
||||
| scrollBeginDrag | 当用户开始拖拽 `ListView` 时调用。 | `Function` | `ALL` |
|
||||
| scrollEndDrag | 当用户停止拖拽 `ListView` 或者放手让 `ListView` 开始滑动的时候调用 | `Function` | `ALL` |
|
||||
| layout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置。 | `Function` | `ALL` |
|
||||
| endReached | 当所有的数据都已经渲染过,并且列表被滚动到最后一条时,将触发 `onEndReached` 回调。 | `Function` | `Android、iOS` |
|
||||
| momentumScrollBegin | 在 `ListView` 开始滑动的时候调起 | `Function` | `Android、iOS` |
|
||||
| momentumScrollEnd | 在 `ListView` 结束滑动的时候调起 | `Function` | `Android、iOS` |
|
||||
| scroll | 当触发 `ListView` 的滑动事件时回调。由于在 `ListView` 滑动时回调,调用会非常频繁,请使用 `scrollEventThrottle` 进行频率控制。 注意:ListView 在滚动时会进行组件回收,不要在滚动时对 renderRow() 生成的 ListItemView 做任何 ref 节点级的操作(例如:所有 callUIFunction 和 measureInAppWindow 方法),回收后的节点将无法再进行操作而报错。横向ListView时,Android在 `2.8.0` 版本后支持 | `(obj: { contentOffset: { x: number, y: number } }) => any` | `Android、iOS` |
|
||||
| scrollBeginDrag | 当用户开始拖拽 `ListView` 时调用。 | `Function` | `Android、iOS` |
|
||||
| scrollEndDrag | 当用户停止拖拽 `ListView` 或者放手让 `ListView` 开始滑动的时候调用 | `Function` | `Android、iOS` |
|
||||
| layout | 当元素挂载或者布局改变的时候调用,参数为: `nativeEvent: { layout: { x, y, width, height } }`,其中 `x` 和 `y` 为相对父元素的坐标位置。 | `Function` | `Android、iOS` |
|
||||
| delete | 在列表项侧滑删除时调起。`最低支持版本2.9.0` | `(nativeEvent: { index: number}) => void` | `iOS` |
|
||||
|
||||
## 方法
|
||||
@@ -381,13 +381,13 @@ ul 的子节点,终端层节点回收和复用的最小颗粒度。
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| --------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | -------- |
|
||||
| type | 指定一个函数,在其中返回对应条目的类型(返回Number类型的自然数,默认是0),List 将对同类型条目进行复用,所以合理的类型拆分,可以很好地提升 List 性能。`注意:同一 type 的 item 组件由于复用可能不会走完整组件创建生命周期` | `number` | `ALL` |
|
||||
| key | 指定一个函数,在其中返回对应条目的 Key 值,详见 [Vue 官文](//cn.vuejs.org/v2/guide/list.html) | `string` | `ALL` |
|
||||
| sticky | 对应的 item 是否需要使用悬停效果(滚动到顶部时,会悬停在 ListView 顶部,不会滚出屏幕),需跟 `ul` 的 `rowShouldSticky` 配合使用 | `boolean` | `ALL`
|
||||
| appear | 当有`li`节点滑动进入屏幕时(曝光)触发,入参返回曝光的`li`节点对应索引值。 | `(index) => any` | `ALL` |
|
||||
| disappear | 当有`li`节点滑动离开屏幕时触发,入参返回离开的`li`节点对应索引值。 | `(index) => any` | `ALL` |
|
||||
| willAppear | 当有`li`节点至少一个像素滑动进入屏幕时(曝光)触发,入参返回曝光的`li`节点对应索引值。`最低支持版本2.3.0` | `(index) => any` | `ALL` |
|
||||
| willDisappear | 当有`li`节点至少一个像素滑动离开屏幕时触发,入参返回离开的`li`节点对应索引值。`最低支持版本2.3.0` | `(index) => any` | `ALL` |
|
||||
| type | 指定一个函数,在其中返回对应条目的类型(返回Number类型的自然数,默认是0),List 将对同类型条目进行复用,所以合理的类型拆分,可以很好地提升 List 性能。`注意:同一 type 的 item 组件由于复用可能不会走完整组件创建生命周期` | `number` | `Android、iOS` |
|
||||
| key | 指定一个函数,在其中返回对应条目的 Key 值,详见 [Vue 官文](//cn.vuejs.org/v2/guide/list.html) | `string` | `Android、iOS` |
|
||||
| sticky | 对应的 item 是否需要使用悬停效果(滚动到顶部时,会悬停在 ListView 顶部,不会滚出屏幕),需跟 `ul` 的 `rowShouldSticky` 配合使用 | `boolean` | `Android、iOS`
|
||||
| appear | 当有`li`节点滑动进入屏幕时(曝光)触发,入参返回曝光的`li`节点对应索引值。 | `(index) => any` | `Android、iOS` |
|
||||
| disappear | 当有`li`节点滑动离开屏幕时触发,入参返回离开的`li`节点对应索引值。 | `(index) => any` | `Android、iOS` |
|
||||
| willAppear | 当有`li`节点至少一个像素滑动进入屏幕时(曝光)触发,入参返回曝光的`li`节点对应索引值。`最低支持版本2.3.0` | `(index) => any` | `Android、iOS` |
|
||||
| willDisappear | 当有`li`节点至少一个像素滑动离开屏幕时触发,入参返回离开的`li`节点对应索引值。`最低支持版本2.3.0` | `(index) => any` | `Android、iOS` |
|
||||
|
||||
---
|
||||
|
||||
@@ -401,17 +401,17 @@ ul 的子节点,终端层节点回收和复用的最小颗粒度。
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| numberOfLines | 用来当文本过长的时候裁剪文本。包括折叠产生的换行在内,总的行数不会超过这个属性的限制。 | `number` | `ALL` |
|
||||
| opacity | 配置 `View` 的透明度,同时会影响子节点的透明度。 | `number` | `ALL` |
|
||||
| numberOfLines | 用来当文本过长的时候裁剪文本。包括折叠产生的换行在内,总的行数不会超过这个属性的限制。 | `number` | `Android、iOS` |
|
||||
| opacity | 配置 `View` 的透明度,同时会影响子节点的透明度。 | `number` | `Android、iOS` |
|
||||
| ellipsizeMode* | 当设定了 `numberOfLines` 值后,这个参数指定了字符串如何被截断。所以在使用 `ellipsizeMode` 时,必须得同时指定 `numberOfLines` 数值。 | `enum(head, middle, tail, clip)` | `Android 仅支持 tail 属性,iOS 全支持` |
|
||||
|
||||
* ellipsizeMode 的参数含义:
|
||||
@@ -432,10 +432,10 @@ ul 的子节点,终端层节点回收和复用的最小颗粒度。
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `ALL` |
|
||||
| touchstart | 触屏开始事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchmove | 触屏移动事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchend | 触屏结束事件,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
| touchcancel | 触屏取消事件,当用户触屏过程中,某个系统事件中断了触屏,例如电话呼入、组件变化(如设置为hidden)、其他组件的滑动手势,此函数会收到回调,最低支持版本 2.6.2,参数为 `evt: { touches: [{ clientX: number, clientY: number }] }`,`clientX` 和 `clientY` 分别表示点击在屏幕内的绝对位置 | `Function` | `Android、iOS` |
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| playing | 控制动画是否播放 | boolean | `ALL` |
|
||||
| actions* | 动画方案,其实是一个样式值跟上它的动画方案,详情请参考范例。 | Object | `ALL` |
|
||||
| playing | 控制动画是否播放 | boolean | `Android、iOS` |
|
||||
| actions* | 动画方案,其实是一个样式值跟上它的动画方案,详情请参考范例。 | Object | `Android、iOS` |
|
||||
|
||||
* actions 详解
|
||||
|
||||
@@ -40,8 +40,8 @@
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| start | 动画开始时触发 | `Function` | `ALL` |
|
||||
| end | 动画结束时触发 | `Function`| `ALL` |
|
||||
| start | 动画开始时触发 | `Function` | `Android、iOS` |
|
||||
| end | 动画结束时触发 | `Function`| `Android、iOS` |
|
||||
| repeat | 每次循环播放时触发 | `Function` | `Android` |
|
||||
|
||||
## 方法
|
||||
@@ -84,18 +84,18 @@
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| animationType | 动画效果 | `enum(none, slide, fade, slide_fade)` | `ALL` |
|
||||
| animationType | 动画效果 | `enum(none, slide, fade, slide_fade)` | `Android、iOS` |
|
||||
| supportedOrientations | 支持屏幕翻转方向 | `enum(portrait, portrait-upside-down, landscape, landscape-left, landscape-right)[]` | `iOS` |
|
||||
| immersionStatusBar | 是否是沉浸式状态栏。`default: true` | `boolean` | `Android` |
|
||||
| darkStatusBarText | 是否是亮色主体文字,默认字体是黑色的,改成 true 后会认为 Modal 背景为暗色调,字体就会改成白色。 | `boolean` | `ALL` |
|
||||
| transparent | 背景是否是透明的。`default: true` | `boolean` | `ALL` |
|
||||
| darkStatusBarText | 是否是亮色主体文字,默认字体是黑色的,改成 true 后会认为 Modal 背景为暗色调,字体就会改成白色。 | `boolean` | `Android、iOS` |
|
||||
| transparent | 背景是否是透明的。`default: true` | `boolean` | `Android、iOS` |
|
||||
|
||||
## 事件
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| show | 在`Modal`显示时会执行此回调函数。 | `Function` | `ALL` |
|
||||
| orientationChange | 屏幕旋转方向改变 | `Function` | `ALL` |
|
||||
| show | 在`Modal`显示时会执行此回调函数。 | `Function` | `Android、iOS` |
|
||||
| orientationChange | 屏幕旋转方向改变 | `Function` | `Android、iOS` |
|
||||
| requestClose | 在 `Modal`请求关闭时会执行此回调函数,一般时在 Android 系统里按下硬件返回按钮时触发,一般要在里面处理关闭弹窗。 | `Function` | `Android` |
|
||||
|
||||
---
|
||||
@@ -111,19 +111,19 @@
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ------------------------ | ------------------------------------------------------------ | -------------------------------------------- | -------- |
|
||||
| bounces | 是否开启回弹效果,默认 `true` | `boolean` | `iOS` |
|
||||
| current | 实时改变当前所处页码 | `number` | `ALL` |
|
||||
| initialPage | 指定一个数字,用于决定初始化后默认显示的页面index,默认不指定的时候是0 | `number` | `ALL` |
|
||||
| needAnimation | 切换页面时是否需要动画。 | `boolean` | `ALL` |
|
||||
| scrollEnabled | 指定ViewPager是否可以滑动,默认为true | `boolean` | `ALL` |
|
||||
| current | 实时改变当前所处页码 | `number` | `Android、iOS` |
|
||||
| initialPage | 指定一个数字,用于决定初始化后默认显示的页面index,默认不指定的时候是0 | `number` | `Android、iOS` |
|
||||
| needAnimation | 切换页面时是否需要动画。 | `boolean` | `Android、iOS` |
|
||||
| scrollEnabled | 指定ViewPager是否可以滑动,默认为true | `boolean` | `Android、iOS` |
|
||||
| direction | 设置viewPager滚动方向,不设置默认横向滚动,设置 `vertical` 为竖向滚动 | `string` | `Android` |
|
||||
|
||||
## 事件
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| dragging | 拖动时触发。 | `Function` | `ALL` |
|
||||
| dropped | 拖拽松手时触发,就是确定了滚动的页面时触发。 | `Function` | `ALL` |
|
||||
| stateChanged* | 手指行为发生改变时触发,包含了 idle、dragging、settling 三种状态,通过 state 参数返回 | `Function` | `ALL` |
|
||||
| dragging | 拖动时触发。 | `Function` | `Android、iOS` |
|
||||
| dropped | 拖拽松手时触发,就是确定了滚动的页面时触发。 | `Function` | `Android、iOS` |
|
||||
| stateChanged* | 手指行为发生改变时触发,包含了 idle、dragging、settling 三种状态,通过 state 参数返回 | `Function` | `Android、iOS` |
|
||||
|
||||
* stateChanged 三种值的意思:
|
||||
* idle 空闲状态
|
||||
@@ -150,9 +150,9 @@
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| idle | 滑动距离在 pull-header 区域内触发一次,参数 contentOffset | `Function` | `ALL` |
|
||||
| pulling | 滑动距离超出 pull-header 后触发一次,参数 contentOffset | `Function` | `ALL` |
|
||||
| released | 滑动超出距离,松手后触发一次 | `Function` | `ALL` |
|
||||
| idle | 滑动距离在 pull-header 区域内触发一次,参数 contentOffset | `Function` | `Android、iOS` |
|
||||
| pulling | 滑动距离超出 pull-header 后触发一次,参数 contentOffset | `Function` | `Android、iOS` |
|
||||
| released | 滑动超出距离,松手后触发一次 | `Function` | `Android、iOS` |
|
||||
|
||||
## 方法
|
||||
|
||||
@@ -172,9 +172,9 @@
|
||||
|
||||
| 事件名称 | 描述 | 类型 | 支持平台 |
|
||||
| ------------- | ------------------------------------------------------------ | ----------------------------------------- | -------- |
|
||||
| idle | 滑动距离在 pull-footer 区域内触发一次,参数 contentOffset | `Function` | `ALL` |
|
||||
| pulling | 滑动距离超出 pull-footer 后触发一次,参数 contentOffset | `Function` | `ALL` |
|
||||
| refresh | 滑动超出距离,松手后触发一次 | `Function` | `ALL` |
|
||||
| idle | 滑动距离在 pull-footer 区域内触发一次,参数 contentOffset | `Function` | `Android、iOS` |
|
||||
| pulling | 滑动距离超出 pull-footer 后触发一次,参数 contentOffset | `Function` | `Android、iOS` |
|
||||
| refresh | 滑动超出距离,松手后触发一次 | `Function` | `Android、iOS` |
|
||||
|
||||
## 方法
|
||||
|
||||
@@ -196,21 +196,21 @@
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| ----------------- | ----------------------------------------------------- | ---------- | -------- |
|
||||
| columnSpacing | 瀑布流每列之前的水平间距 | `number` | `ALL` |
|
||||
| interItemSpacing | item 间的垂直间距 | `number` | `ALL` |
|
||||
| contentInset | 内容缩进 ,默认值 `{ top:0, left:0, bottom:0, right:0 }` | `Object` | `ALL` |
|
||||
| columnSpacing | 瀑布流每列之前的水平间距 | `number` | `Android、iOS` |
|
||||
| interItemSpacing | item 间的垂直间距 | `number` | `Android、iOS` |
|
||||
| contentInset | 内容缩进 ,默认值 `{ top:0, left:0, bottom:0, right:0 }` | `Object` | `Android、iOS` |
|
||||
| containBannerView | 是否包含`bannerView`,只能有一个bannerView,`Android` 暂不支持 | `boolean` | `iOS` |
|
||||
| containPullHeader | 是否包含`pull-header`;`Android` 暂不支持,可以用 `ul-refresh` 组件替代 | `boolean` | `iOS` |
|
||||
| containPullFooter | 是否包含 `pull-footer` | `boolean` | `ALL` |
|
||||
| numberOfColumns | 瀑布流列数量,Default: 2 | `number` | `ALL` |
|
||||
| preloadItemNumber | 滑动到瀑布流底部前提前预加载的 item 数量 | `number` | `ALL` |
|
||||
| containPullFooter | 是否包含 `pull-footer` | `boolean` | `Android、iOS` |
|
||||
| numberOfColumns | 瀑布流列数量,Default: 2 | `number` | `Android、iOS` |
|
||||
| preloadItemNumber | 滑动到瀑布流底部前提前预加载的 item 数量 | `number` | `Android、iOS` |
|
||||
|
||||
## 事件
|
||||
|
||||
| 事件名称 | 描述 | `类型` | 支持平台 |
|
||||
| --------------------- | -------------- | ---------- | -------- |
|
||||
| endReached | 当所有的数据都已经渲染过,并且列表被滚动到最后一条时,将触发 `onEndReached` 回调。 | `Function` | `ALL` |
|
||||
| scroll | 当触发 `WaterFall` 的滑动事件时回调。`startEdgePos`表示距离 List 顶部边缘滚动偏移量;`endEdgePos`表示距离 List 底部边缘滚动偏移量;`firstVisibleRowIndex`表示当前可见区域内第一个元素的索引;`lastVisibleRowIndex`表示当前可见区域内最后一个元素的索引;`visibleRowFrames`表示当前可见区域内所有 item 的信息(x,y,width,height) | `{ nativeEvent: { startEdgePos: number, endEdgePos: number, firstVisibleRowIndex: number, lastVisibleRowIndex: number, visibleRowFrames: Object[] } }` | `ALL` |
|
||||
| endReached | 当所有的数据都已经渲染过,并且列表被滚动到最后一条时,将触发 `onEndReached` 回调。 | `Function` | `Android、iOS` |
|
||||
| scroll | 当触发 `WaterFall` 的滑动事件时回调。`startEdgePos`表示距离 List 顶部边缘滚动偏移量;`endEdgePos`表示距离 List 底部边缘滚动偏移量;`firstVisibleRowIndex`表示当前可见区域内第一个元素的索引;`lastVisibleRowIndex`表示当前可见区域内最后一个元素的索引;`visibleRowFrames`表示当前可见区域内所有 item 的信息(x,y,width,height) | `{ nativeEvent: { startEdgePos: number, endEdgePos: number, firstVisibleRowIndex: number, lastVisibleRowIndex: number, visibleRowFrames: Object[] } }` | `Android、iOS` |
|
||||
|
||||
## 方法
|
||||
|
||||
@@ -239,5 +239,5 @@
|
||||
|
||||
| 参数 | 描述 | 类型 | 支持平台 |
|
||||
| --------------------- | ------------------------------------------------------------ | ----------------------------------------------------------- | -------- |
|
||||
| type | 指定一个函数,在其中返回对应条目的类型(返回Number类型的自然数,默认是0),List 将对同类型条目进行复用,所以合理的类型拆分,可以很好地提升 List 性能。 | `number` | `ALL` |
|
||||
| key | 指定一个函数,在其中返回对应条目的 Key 值,详见 [Vue 官文](//cn.vuejs.org/v2/guide/list.html) | `string` | `ALL` |
|
||||
| type | 指定一个函数,在其中返回对应条目的类型(返回Number类型的自然数,默认是0),List 将对同类型条目进行复用,所以合理的类型拆分,可以很好地提升 List 性能。 | `number` | `Android、iOS` |
|
||||
| key | 指定一个函数,在其中返回对应条目的 Key 值,详见 [Vue 官文](//cn.vuejs.org/v2/guide/list.html) | `string` | `Android、iOS` |
|
||||
|
||||
+46
-46
@@ -6,67 +6,67 @@
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------------------ | -------- | --- |
|
||||
| [color](style/color.md) | 否 | All
|
||||
| [color](style/color.md) | 否 | Android、iOS
|
||||
|
||||
# borderTopColor
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------------------ | -------- | --- |
|
||||
| [color](style/color.md) | 否 | All
|
||||
| [color](style/color.md) | 否 | Android、iOS
|
||||
|
||||
# borderBottomColor
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------------------ | -------- | --- |
|
||||
| [color](style/color.md) | 否 | All
|
||||
| [color](style/color.md) | 否 | Android、iOS
|
||||
|
||||
# borderLeftColor
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------------------ | -------- | --- |
|
||||
| [color](style/color.md) | 否 | All
|
||||
| [color](style/color.md) | 否 | Android、iOS
|
||||
|
||||
# borderRightColor
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------------------ | -------- | --- |
|
||||
| [color](style/color.md) | 否 | All
|
||||
| [color](style/color.md) | 否 | Android、iOS
|
||||
|
||||
# borderRadius
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------ | -------- | --- |
|
||||
| number | 否 | All
|
||||
| number | 否 | Android、iOS
|
||||
|
||||
# borderTopLeftRadius
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------ | -------- | --- |
|
||||
| number | 否 | All
|
||||
| number | 否 | Android、iOS
|
||||
|
||||
# borderTopRightRadius
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------ | -------- | --- |
|
||||
| number | 否 | All
|
||||
| number | 否 | Android、iOS
|
||||
|
||||
# borderBottomLeftRadius
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------ | -------- | --- |
|
||||
| number | 否 | All
|
||||
| number | 否 | Android、iOS
|
||||
|
||||
# borderBottomRightRadius
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------ | -------- | --- |
|
||||
| number | 否 | All
|
||||
| number | 否 | Android、iOS
|
||||
|
||||
# borderWidth
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------ | -------- | --- |
|
||||
| number | 否 | All
|
||||
| number | 否 | Android、iOS
|
||||
|
||||
# borderTopWidth
|
||||
|
||||
@@ -96,21 +96,21 @@
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------------------ | -------- | --- |
|
||||
| [color](style/color.md) | 否 | All
|
||||
| [color](style/color.md) | 否 | Android、iOS
|
||||
|
||||
# borderStyle
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| --------------------------------- | -------- | --- |
|
||||
| enum('solid', 'dotted', 'dashed') | 否 | 双平台。dotted、dashed 暂仅支持 iOS
|
||||
| enum('solid', 'dotted', 'dashed') | 否 | Android、iOS。dotted、dashed 暂仅支持 iOS
|
||||
|
||||
|
||||
# boxShadow
|
||||
|
||||
| 类型 | 必需 | 平台 |
|
||||
| ------ | -------- | --------|
|
||||
| [Hippy-React 参考例子](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/BoxShadow/index.jsx) | 否 | 双平台支持,Android实现有差异(详见例子)
|
||||
| [Hippy-Vue 参考例子](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-shadow.vue) | 否 | 双平台支持,Android实现有差异(详见例子)
|
||||
| [Hippy-React 参考例子](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/BoxShadow/index.jsx) | 否 | Android、iOS,Android实现有差异(详见例子)
|
||||
| [Hippy-Vue 参考例子](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-shadow.vue) | 否 | Android、iOS,Android实现有差异(详见例子)
|
||||
|
||||
# color
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------ | -------- | --- |
|
||||
| [color](style/color.md) | 否 | All
|
||||
| [color](style/color.md) | 否 | Android、iOS
|
||||
|
||||
# fontFamily
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------ | -------- | --- |
|
||||
| string | 否 | All
|
||||
| string | 否 | Android、iOS
|
||||
|
||||
# fontSize
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------ | -------- | --- |
|
||||
| number | 否 | All
|
||||
| number | 否 | Android、iOS
|
||||
|
||||
# fontWeight
|
||||
|
||||
@@ -146,13 +146,13 @@
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------ | -------- | --- |
|
||||
| number \| string | 否 | All
|
||||
| number \| string | 否 | Android、iOS
|
||||
|
||||
# opacity
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------ | -------- | --- |
|
||||
| number | 否 | All
|
||||
| number | 否 | Android、iOS
|
||||
|
||||
# textDecoration
|
||||
|
||||
@@ -160,13 +160,13 @@
|
||||
|
||||
| 类型 | 必需 | 平台 |
|
||||
| ------ | -------- | --------|
|
||||
| enum('underline', 'line-through', 'none') | 否 | 双平台支持 |
|
||||
| enum('underline', 'line-through', 'none') | 否 | Android、iOS |
|
||||
|
||||
# textDecorationColor
|
||||
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
|
||||
文本的修饰线颜色
|
||||
|
||||
@@ -176,21 +176,21 @@
|
||||
|
||||
# textDecorationLine
|
||||
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
|
||||
文本的修饰线类型
|
||||
|
||||
| 类型 | 必需 | 平台 |
|
||||
| ------ | -------- | --------|
|
||||
| enum('underline', 'line-through', 'none') | 否 | 双平台支持 |
|
||||
| enum('underline', 'line-through', 'none') | 否 | Android、iOS |
|
||||
|
||||
# textDecorationStyle
|
||||
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
|
||||
文本的修饰线样式
|
||||
|
||||
@@ -202,85 +202,85 @@
|
||||
|
||||
> 最低支持版本 2.10.0
|
||||
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
|
||||
文字阴影颜色
|
||||
|
||||
| 类型 | 必需 | 平台 |
|
||||
| ------ | -------- | --------|
|
||||
| [color](style/color.md) | 否 | 双平台支持 |
|
||||
| [color](style/color.md) | 否 | Android、iOS |
|
||||
|
||||
# textShadowOffset
|
||||
|
||||
> 最低支持版本 2.10.0
|
||||
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
|
||||
文字阴影偏移量
|
||||
|
||||
| 类型 | 必需 | 平台 |
|
||||
| ------ | -------- | --------|
|
||||
| object: { x: number, y: number } | 否 | 双平台支持 |
|
||||
| object: { x: number, y: number } | 否 | Android、iOS |
|
||||
|
||||
# textShadowOffsetX
|
||||
|
||||
> * 最低支持版本 2.10.0
|
||||
> * 注意 hippy-vue class 样式只支持合并写法 `text-shadow-offset: 1px 1px`,不支持拆分
|
||||
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
|
||||
文字阴影X轴偏移量
|
||||
|
||||
| 类型 | 必需 | 平台 |
|
||||
| ------ | -------- | --------|
|
||||
| number | 否 | 双平台支持 |
|
||||
| number | 否 | Android、iOS |
|
||||
|
||||
# textShadowOffsetY
|
||||
|
||||
> * 最低支持版本 2.10.0
|
||||
> * 注意 hippy-vue class 样式只支持合并写法 `text-shadow-offset: 1px 1px`,不支持拆分
|
||||
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
|
||||
文字阴影Y轴偏移量
|
||||
|
||||
| 类型 | 必需 | 平台 |
|
||||
| ------ | -------- | --------|
|
||||
| number | 否 | 双平台支持 |
|
||||
| number | 否 | Android、iOS |
|
||||
|
||||
# textShadowRadius
|
||||
|
||||
> 最低支持版本 2.10.0
|
||||
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Text/index.jsx)
|
||||
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-p.vue)
|
||||
|
||||
文字阴影半径
|
||||
|
||||
| 类型 | 必需 | 平台 |
|
||||
| ------ | -------- | --------|
|
||||
| number | 否 | 双平台支持 |
|
||||
| number | 否 | Android、iOS |
|
||||
|
||||
# tintColor
|
||||
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/Image/index.jsx)
|
||||
[Hippy-React 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-react-demo/src/components/Image/index.jsx)
|
||||
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-img.vue)
|
||||
[Hippy-Vue 范例](https://github.com/Tencent/Hippy/blob/master/examples/hippy-vue-demo/src/components/demos/demo-img.vue)
|
||||
|
||||
对图片进行染色(iOS暂不支持透明度)
|
||||
|
||||
| 类型 | 必需 | 支持平台
|
||||
| ------------------ | -------- | --- |
|
||||
| [color](style/color.md) | 否 | All
|
||||
| [color](style/color.md) | 否 | Android、iOS
|
||||
|
||||
# visibility
|
||||
|
||||
|
||||
Reference in New Issue
Block a user