breaking change(SwipeCell): adjust before-close usage
This commit is contained in:
@@ -78,15 +78,15 @@ export default {
|
||||
case 'left':
|
||||
case 'cell':
|
||||
case 'outside':
|
||||
instance.close();
|
||||
break;
|
||||
return true;
|
||||
case 'right':
|
||||
Dialog.confirm({
|
||||
message: 'Are you sure to delete?',
|
||||
}).then(() => {
|
||||
instance.close();
|
||||
return new Promise((resolve) => {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
message: 'Are you sure to delete?',
|
||||
})
|
||||
.then(resolve);
|
||||
});
|
||||
break;
|
||||
}
|
||||
},
|
||||
},
|
||||
@@ -102,7 +102,7 @@ export default {
|
||||
| name | Identifier of SwipeCell | _number \| string_ | - |
|
||||
| left-width | Width of the left swipe area | _number \| string_ | `auto` |
|
||||
| right-width | Width of the right swipe area | _number \| string_ | `auto` |
|
||||
| before-close `v2.3.0` | Callback function before close | _Function_ | - |
|
||||
| before-close `v2.3.0` | Callback function before close | _(args) => boolean \| Promise_ | - |
|
||||
| disabled | Whether to disabled swipe | _boolean_ | `false` |
|
||||
| stop-propagation | Whether to stop touchmove event propagation | _boolean_ | `false` |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user