swipeable-cell
A swipe cell imitate iOS style
1. installation
npm install swipeable-cell -S
2. how to use
- import component in your project.
improt SwipeableCell from 'swipeable-cell'
- add to your component
<swipeable-cell v-for="(item, index) in dataList",
:key="index",
:index="index",
@swipeable-cell-delete="deleteItem">
// ... your cell container dom
</swipeable-cell>
- in your component's methods
export default {
...
methods: {
deleteItem(index) {
this.splice(index, 1);
}
}
}
features
- supporting automatally fit your cell content's height.
- supporting embedded in pulling refresh component.
if you like it, I'm warmly welcome your PR and issues. ❤️