Skip to content

Commit b45428f

Browse files
committed
doc(ActionSheet): 弹窗只能关闭一次
1 parent 17f1e28 commit b45428f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

packages/core/src/ActionSheet/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function Demo() {
1717
return (
1818
<Fragment>
1919
<Button onPress={()=>setVisible(true)}>打开 ActionSheet</Button>
20-
<ActionSheet visible={visible}>
20+
<ActionSheet visible={visible} onCancel={()=>setVisible(false)}>
2121
<ActionSheetItem onPress={()=>console.log('按钮一')}>按钮一</ActionSheetItem>
2222
<ActionSheetItem onPress={()=>console.log('按钮二')}>按钮二</ActionSheetItem>
2323
</ActionSheet>
@@ -38,11 +38,7 @@ function Demo() {
3838
return (
3939
<Fragment>
4040
<Button onPress={()=>setVisible(true)}>打开 ActionSheet</Button>
41-
<ActionSheet
42-
visible={visible}
43-
onCancel={true}
44-
cancelText='关闭弹层'
45-
>
41+
<ActionSheet visible={visible} onCancel={()=>setVisible(false)} cancelText="关闭弹层">
4642
<ActionSheetItem onPress={()=>console.log('按钮一')}>按钮一</ActionSheetItem>
4743
<ActionSheetItem onPress={()=>console.log('按钮二')}>按钮二</ActionSheetItem>
4844
</ActionSheet>

0 commit comments

Comments
 (0)