diff --git a/packages/api-proxy/src/platform/api/action-sheet/rnActionSheet.jsx b/packages/api-proxy/src/platform/api/action-sheet/rnActionSheet.jsx index 280d04b0d6..5d3f33df96 100644 --- a/packages/api-proxy/src/platform/api/action-sheet/rnActionSheet.jsx +++ b/packages/api-proxy/src/platform/api/action-sheet/rnActionSheet.jsx @@ -1,4 +1,4 @@ -import { View, TouchableHighlight, Text, StyleSheet, TouchableOpacity } from 'react-native' +import { View, Text, StyleSheet } from 'react-native' import { successHandle, failHandle } from '../../../common/js' import { Portal } from '@ant-design/react-native' import { getWindowInfo } from '../system/rnSystem' @@ -64,7 +64,8 @@ function showActionSheet (options = {}) { offset.value = withTiming(0) - const selectAction = function (index) { + const selectAction = function (index, e) { + e.stopPropagation() const result = { errMsg: 'showActionSheet:ok', tapIndex: index @@ -83,7 +84,8 @@ function showActionSheet (options = {}) { } } - const cancelAction = function () { + const cancelAction = function (e) { + e.stopPropagation() const result = { errMsg: 'showActionSheet:fail cancel' } @@ -91,17 +93,17 @@ function showActionSheet (options = {}) { remove() } return ( - - + + { alertText ? {alertText} : null } - { itemList.map((item, index) => selectAction(index)} style={ [styles.itemStyle, itemList.length -1 === index ? { + { itemList.map((item, index) => selectAction(index, e)} style={ [styles.itemStyle, itemList.length -1 === index ? { borderBottomWidth: 6, borderBottomStyle: 'solid', borderBottomColor: '#f7f7f7' - } : {}] }>{item}) } - 取消 + } : {}] }>{item}) } + 取消 - + ) }