breaking change(SwipeCell): adjust before-close usage

This commit is contained in:
chenjiahan
2020-09-06 10:40:00 +08:00
parent 89a39f05bc
commit d61df0649f
7 changed files with 48 additions and 47 deletions
+9 -11
View File
@@ -81,22 +81,20 @@ export default {
},
methods: {
beforeClose({ position, instance }) {
beforeClose({ position }) {
switch (position) {
case 'left':
case 'cell':
case 'outside':
instance.close();
break;
return true;
case 'right':
this.$dialog
.confirm({
message: this.t('confirm'),
})
.then(() => {
instance.close();
});
break;
return new Promise((resolve) => {
this.$dialog
.confirm({
message: this.t('confirm'),
})
.then(resolve);
});
}
},
},