File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
packages/core/src/ActionSheet Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff 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>
You can’t perform that action at this time.
0 commit comments