0.1.4 • Published 4 years ago

@col0ring/swipe-cell v0.1.4

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

swipe-cell

一个基于 vue 3 的 SwipeCell 组件。

Usage

npm i @col0ring/swipe-cell
# or
yarn add @col0ring/swipe-cell
import { createApp } from 'vue'
import SwipeCell from '@col0ring/swipe-cell'
const app = createApp()
app.use(SwipeCell)

Api

Attributes

参数说明
content内容区域值
delText默认删除按钮文字

Events

参数说明
delete点击删除按钮回调

Slots

参数说明
default(默认插槽)内容区域
actions滑动按钮区域,可手动修改按钮

Demo

<template>
  <div>
    <swipe-cell content="example"> </swipe-cell>
    <swipe-cell content="example" delText="delete" @delete="handleDelete">
    </swipe-cell>
    <swipe-cell>
      example
      <template #actions>
        <button>删除1</button>
        <button>删除2</button>
      </template>
    </swipe-cell>
  </div>
</template>

<script>
export default defineComponent({
  setup() {
    const handleDelete = () => {
      console.log('delete')
    }
    return {
      handleDelete
    }
  }
})
</script>
0.1.4

4 years ago

0.1.2

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago