@col0ring/swipe-cell
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

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>

Readme

Keywords

none

Package Sidebar

Install

npm i @col0ring/swipe-cell

Weekly Downloads

0

Version

0.1.4

License

MIT

Unpacked Size

219 kB

Total Files

10

Last publish

Collaborators

  • col0ring