# 6.2 滑动单元格(Swipe Cell)

可侧滑的单元格组件

# 基础用法

<template>
  <dof-swipe-cell :buttons-text="buttons" @dofSwipeCellClick="onClick">
    <text>列表项内容</text>
  </dof-swipe-cell>
</template>

<script>
export default {
  data() {
    return {
      buttons: [{ text: '删除', bgColor: '#ff0000' }]
    }
  }
}
</script>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

# Attributes

Prop Type Required Default Description
slide-direction Number N 1 滑动方向(1=右滑)
buttons-text Array N [] 侧滑按钮配置
back-accept Number N 0 回弹接受度

# Events

事件名 说明 回调参数
dofSwipeCellClick 侧滑按钮点击事件 e