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

怎么关闭tab切换时此组件显示后的动画效果 #24

Open
LvHuaiSheng opened this issue Jun 10, 2023 · 2 comments
Open

怎么关闭tab切换时此组件显示后的动画效果 #24

LvHuaiSheng opened this issue Jun 10, 2023 · 2 comments

Comments

@LvHuaiSheng
Copy link

LvHuaiSheng commented Jun 10, 2023

在同一页面使用tabs切换显示此组件的瀑布流,每切换一次动画都要重新播放一次,如何关闭掉?
我尝试设置delay来取消动画,但只能稍微缩短,设置过低将会出现视图更新问题

想移除掉的动画效果:视频查看

@heikaimu
Copy link
Owner

heikaimu commented Jul 4, 2023

这个问题其实是因为你的tab使用的应该是v-if,这样每次切换组件都会重新渲染,你可以尝试下使用v-show,或者使用keep-alive,看能不能解决这个问题,只要你保持了组件状态,就能解决这个问题。

@heikaimu
Copy link
Owner

heikaimu commented Jul 4, 2023

你还可以试试把animationDuration, animationDelay 这两个参数都设置为0,这两个设置为0后就没有动画了,然后你需要动画的话,可以加一个延迟器,再组件创建后的1s之后再把这个两个参数设置一个值

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

2 participants