-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImagePreview组件 Close 方法执行两遍 #5338
Comments
可能是多次调用 ImagePreview 导致的,下个版本会兼容下 |
已在 2.3.2 版本修复 |
看起来没什么问题,能否提供下复现的 codesandbox 链接呢 |
@chenjiahan this.$emit('close', {
index,
url: this.images[index]
});
if (!this.asyncClose) {
this.$emit('input', false);
} 异步关闭不应该执行 this.$emit('close') if (!this.asyncClose) {
this.$emit('close', {
index,
url: this.images[index]
});
this.$emit('input', false);
} |
@Zclhlmgqzc 这里确实有问题,下个版本会修复下 |
This was referenced Dec 28, 2019
已在 2.4.0-beta.0 版本修复 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你好,我把ImagePreview组件单独放在一个页面里, 图片预览时跳转至该页面, 触发close方法时,
onClose() {
console.log(this.$router);
this.$router.back();
}
代码如上,发现路由返回了上上个页面,调试的时候发现console执行了两次,我只点了一下,请问可能是什么原因呢?
The text was updated successfully, but these errors were encountered: