File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
packages/core/src/ActionSheet Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export interface ActionSheetProps extends ModalProps {
2727 /** 取消的文本 */
2828 cancelText ?: React . ReactNode ;
2929 /** 蒙层关闭回调 */
30- onCancel ? : ( ) => void ;
30+ onCancel : ( ) => void ;
3131}
3232
3333interface ActionSheetState {
@@ -82,8 +82,6 @@ export default function ActionSheet(props: ActionSheetProps) {
8282 }
8383 } ;
8484
85- const onClose = ( ) => onCancel ?.( ) ;
86-
8785 return (
8886 < Modal
8987 placement = "bottom"
@@ -107,7 +105,7 @@ export default function ActionSheet(props: ActionSheetProps) {
107105 < ActionSheetItem
108106 activeOpacity = { activeOpacity }
109107 underlayColor = { underlayColor }
110- onPress = { onClose }
108+ onPress = { ( ) => onCancel ?. ( ) }
111109 children = { cancelText }
112110 containerStyle = { containerStyle }
113111 textStyle = { textStyle }
You can’t perform that action at this time.
0 commit comments