ActionSheet
Install
Usage
Basic Usage
Use actions
prop to set options of action-sheet.
Status
ActionSheet with cancel button
Show Description
ActionSheet with title
API
Props
Attribute |
Description |
Type |
Default |
actions |
Options |
Action[] |
[] |
title |
Title |
string |
- |
cancel-text |
Text of cancel button |
string |
- |
description v2.2.8 |
Description above the options |
string |
- |
overlay |
Whether to show overlay |
boolean |
true |
round v2.0.9 |
Whether to show round corner |
boolean |
true |
close-icon v2.2.13 |
Close icon name |
string |
close |
close-on-click-action |
Whether to close when click action |
boolean |
false |
close-on-click-overlay |
Whether to close when click overlay |
boolean |
true |
lazy-render |
Whether to lazy render util appeared |
boolean |
true |
lock-scroll |
Whether to lock background scroll |
boolean |
true |
duration v2.0.3 |
Transition duration, unit second |
number |
0.3 |
get-container |
Return the mount node for action-sheet |
string | () => Element |
- |
safe-area-inset-bottom |
Whether to enable bottom safe area adaptation |
boolean |
true |
Events
Event |
Description |
Arguments |
select |
Triggered when click option |
item, index |
cancel |
Triggered when cancel click |
- |
click-overlay |
Triggered when click overlay |
- |
open |
Triggered when open ActionSheet |
- |
opened |
Triggered when opened ActionSheet |
- |
close |
Triggered when close ActionSheet |
- |
closed |
Triggered when closed ActionSheet |
- |
Data Structure of Action
Key |
Description |
Type |
name |
Title |
string |
subname |
Subtitle |
string |
color |
Text color |
string |
className |
className for the option |
any |
loading |
Whether to be loading status |
boolean |
disabled |
Whether to be disabled |
boolean |