SwipeCell
A cell component that can slide left and right to display action buttons.
Basic usage
Just wrap the content inside the Sticky
component.
API
Props
Parameter | Description | Type | Default |
name | Identifier, which can be obtained from the parameters of the close event | string | number | - |
left-width | left sliding area width | number | 0 |
right-width | The width of the right sliding area | number | 0 |
async-close | Whether to close asynchronously | boolean | false |
disabled v1.3.4 | Whether to disable sliding | boolean | false |
Slot
Name | Description |
- | Customize display content |
left | Left sliding content |
right | Swipe content to the right |
Events
Event Name | Description | Parameters |
click | Triggered on click | Click position on close (left right cell outside ) |
close | trigger when close | { position: 'left' | 'right' , instance , name: string } |
open | fires when open | { position: 'left' | 'right' , name: string } |
close parameter
parameter | type | description |
position | string | Click position when closing (left right cell outside ) |
instance | object | SwipeCell instance |
name | identifier | string |
method
You can get the SwipeCell instance and call the instance method through selectComponent
method name | parameters | return value | description |
open | position: left \| right | - | open cell sidebar |
close | - | - | Collapse cell sidebar |