mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[improvement] ImagePreview: add onClose params (#2197)
This commit is contained in:
@@ -141,8 +141,14 @@ export default create({
|
||||
|
||||
// prevent long tap to close component
|
||||
if (deltaTime < 300 && offsetX < 10 && offsetY < 10) {
|
||||
this.$emit('input', false);
|
||||
const index = this.active;
|
||||
|
||||
this.resetScale();
|
||||
this.$emit('input', false);
|
||||
this.$emit('close', {
|
||||
index,
|
||||
url: this.images[index]
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user