Skip to content
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

关于父元素的大小发生变化,组件移动区域未改变的问题 #33

Open
gorkys opened this issue Jun 16, 2020 · 0 comments

Comments

@gorkys
Copy link
Owner

gorkys commented Jun 16, 2020

问题参考原作者的issues,很多人问,并且一直纠结于提问者给出的方案,其实原作者已在下面给出更好的解决方案。
主动触发windowresize事件就可以解决。
在业务中动态调整父元素的大小后,使用:

this.$nextTick(() => {
     window.dispatchEvent(new Event('resize'))
})

即可...

@gorkys gorkys pinned this issue Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant