nav: path: /components group: title: 信息展示 order: 8
列表的功能扩展。
通过滑动操作来展示隐藏的功能菜单。
属性 | 类型 | 默认值 | 说明 |
---|---|---|---|
leftButtons | SwipeButton | [] | 左侧按钮 |
rightButtons | SwipeButton | [] | 右侧按钮 |
damping | number | 70 | 滑动速度 |
elasticity | boolean | true |
滑动弹性 |
swiped | '' | 'left' | 'right' |
false |
是否滑开 |
defaultSwiped | '' | 'left' | 'right' |
false |
是否默认滑开 |
disabled | boolean | false |
禁止滑动 |
onSwipeStart | 滑动开始的回调函数 | (data: object, e: string) => void | e: 组件上 data-xxx 中的数据;data: direction(滑动的按钮是左边还是右边),swiped(是否滑开) |
onSwipeEnd | 滑动结束的回调函数 | (data: object, e: string) => void | e: 组件上 data-xxx 中的数据;data: direction(滑动的按钮是左边还是右边),swiped(是否滑开) |
onButtonTap | 按钮触发的回调函数 | (data: object, e: string) => void | e: 组件上 data-xxx 中的数据;data: direction(滑动的按钮是左边还是右边),btnIdx(按钮的索引,靠近主体部分为 0) |
属性 | 类型 | 默认值 | 说明 |
---|---|---|---|
text | string | - | 按钮文字 |
bgColor | string | - | 按钮背景颜色 |
color | string | #fff |
按钮字体颜色 |
width | number | 150 | 按钮宽度 |
confirmType | '' | 'move' | 'tap' |
- | 二次确认类型:不触发二次确认 | 滑动超出最大距离触发二次确认 | 点击触发二次确认 |
confirmText | string | - | 二次确认的文案描述;若为空,则展示 text |