# Swipeout

# 介绍

可以向左滑动来展示操作按钮的组件。

# 引入

"usingComponents": {
  "m-swipeout": "/dist/swipeout/index"
}

# 示例

<m-swipeout 
  data-id="{{ id }}"
  auto-close
  bind:click="handleClick"
  bind:open="handleOpen"
  bind:close="handleClose"
  bind:change="handleChange"
>
  <view class="demo-content">
    slot
  </view>

  <view class="btn-group" slot="button">
    slot="button"
  </view>
</m-swipeout>
Page({
	data: {
		id: 1
	},

	// 点击事件
	handleClick(e) {
		// e.detail
	},

	// 当前组件实例
	handleChange(e) {
		
	}
})

# Properties

参数 说明 类型 默认值
async-close 是否异步关闭 Boolean false

# Slot

名称 说明
自定义展示内容
button 自定义滑动块内容

# Events

事件名称 说明 回调参数
$close 关闭实例
open 打开时触发 当前组件实例
close 关闭时触发 当前组件实例
change 打开或关闭时触发 当前组件实例
click 点击时触发