fix(ImagePreview): should not emit close event after tapped when using async-close (#5410)

This commit is contained in:
neverland
2019-12-28 08:09:24 +08:00
committed by GitHub
parent 3250804791
commit 93e6c81c49
2 changed files with 18 additions and 7 deletions

View File

@@ -118,12 +118,12 @@ export default createComponent({
this.doubleClickTimer = setTimeout(() => {
const index = this.active;
this.$emit('close', {
index,
url: this.images[index]
});
if (!this.asyncClose) {
this.$emit('close', {
index,
url: this.images[index]
});
this.$emit('input', false);
}