SwipeCell 滑动单元格
使用指南
在 app.json 或 index.json 中引入swipe-cell、cell组件
{
"usingComponents": {
"fs-swipe-cell": "path/components/swipe-cell/index",
"fs-cell": "path/components/-group/index"
}
}
1
2
3
4
5
6
7
2
3
4
5
6
7
代码演示
- 基础
<fs-swipe-cell
leftText="选择"
rightText="删除">
<fs-cell title="商品" noHoverClass>
<span>¥ 1.0</span>
</fs-cell>
</fs-swipe-cell>
1
2
3
4
5
6
7
2
3
4
5
6
7
属性
| 参数 | 说明 | 类型 | 默认值 |
|---|---|---|---|
| custom-class | 外部样式 | String | - |
| disabled | 是否disable true false 'left' 'right' | Boolen,String | - |
| left-text | 左边按钮文本 | String | - |
| right-text | 右边按钮文本 | String | - |
| button-width | 按钮宽度 | Number | 140 rpx |
| auto-close | 点击左右按钮后自动关闭 | Boolen | - |
插槽
| 插槽名 | 说明 |
|---|---|
| left | 左边按钮内容 |
| right | 右边按钮内容 |
事件
| event | 说明 | 返回值 |
|---|---|---|
| action | 点击 | position |
← Dialog 弹出框 Toast 轻提示 →