feat(SwipeCell): add before-close prop (#5320)

This commit is contained in:
neverland
2019-12-19 21:02:46 +08:00
committed by GitHub
parent 228b35af9b
commit ac00d78a46
5 changed files with 81 additions and 33 deletions
+3 -3
View File
@@ -31,7 +31,7 @@
</demo-block>
<demo-block :title="$t('title2')">
<van-swipe-cell :on-close="onClose">
<van-swipe-cell :before-close="beforeClose">
<template #left>
<van-button
square
@@ -79,8 +79,8 @@ export default {
},
methods: {
onClose(clickPosition, instance) {
switch (clickPosition) {
beforeClose({ position, instance }) {
switch (position) {
case 'left':
case 'cell':
case 'outside':