fix(ImagePreview): onClose should only trigger once (#5341)

This commit is contained in:
neverland
2019-12-20 20:39:29 +08:00
committed by GitHub
parent 8cb653afc7
commit 5389bcf4fb
2 changed files with 21 additions and 0 deletions
+1
View File
@@ -54,6 +54,7 @@ const ImagePreview = (images, startPosition = 0) => {
});
if (options.onClose) {
instance.$off('close');
instance.$once('close', options.onClose);
}