import { Swipeout, SwipeoutItem, SwipeoutButton } from 'vux'
swipeout-item
swipeout-item
Props
| name | type | default | description | required version |
| sensitivity | number | 0 | 滑动多少距离后开始触发菜单显示 | -- |
| auto-close-on-button-click | boolean | true | 点击按钮后是否收回菜单 | -- |
| disabled | boolean | false | 是否不可滑动 | -- |
| threshold | number | 0.3 | 滑动多少距离后自动打开菜单,否则收回。可以为小于1的比例或者宽度值 | -- |
| transition-mode | string | reveal | 菜单打开方式,reveal表示菜单不动内容滑出,follow表示菜单随内容滑出 | -- |
Events
| name | params | description | required version |
| @on-open | -- | -- | -- |
| @on-close | -- | -- | -- |
Slots
| name | description | required version |
| left-menu | -- | |
| right-menu | -- |
Functions
| name | params | description | required version |
| open | (direction) | 打开菜单,参数为方向 | |
| close | 关闭菜单 |
swipeout-button
Variables
swipeout-button
Props
| name | type | default | description | required version |
| text | string | 按钮文字,同slot=default | -- | |
| background-color | string | 背景颜色 | -- | |
| type | string | 内置的颜色类型,可选primary, warn | -- | |
| width | string | 80 | 按钮宽度 | -- |
| disabled | boolean | false | if disabled | -- |
Variables
| name | default | description | inherited name |
| @swipeout-button-primary-bg-color | #1AAD19 | -- | @button-primary-bg-color |
| @swipeout-button-warn-bg-color | #E64340 | -- | @button-warn-bg-color |
| @swipeout-button-default-bg-color | #c8c7cd | -- | |
| @swipeout-content-bg-color | #FFF | -- | |
| @swipeout-button-font-color | #FFF | -- |
Changelog
Releases
- next [feature] Add prop:disabled
- v2.5.5 [enhance] swipeout-item add render method #1688
- v2.1.1-rc.9 [fix] Fix left-menu is shown when swiping right quickly
- v2.1.1-rc.7 [fix] Fix button click on Android. #1044 @tangtaoit
- v2.1.1-rc.14 [fix] Fix left-menu is shown when sliding back and forth #1139
- v2.2.0 [fix] Fix cannot scroll when disabled
- v2.2.0 [fix] Fix unable to trigger click event when disabled on android