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

The 'afterEnter' hook dose not 'wait for the transition to finish' #1781

Closed
zcoding opened this issue Nov 10, 2015 · 3 comments
Closed

The 'afterEnter' hook dose not 'wait for the transition to finish' #1781

zcoding opened this issue Nov 10, 2015 · 3 comments
Labels

Comments

@zcoding
Copy link

zcoding commented Nov 10, 2015

afterEnter钩子并没有等到transition结束才调用,而是在transition刚触发后就调用了?

我以为我写错了,然而我看了官网的例子,afterEnter也是在transition结束之前就调用了。但是afterLeave确实在transition结束之后才调用。

为什么afterEnter没有像afterLeave那样,在transition结束之后才调用呢?这对我写过渡效果的组件影响很大,因为很多时候需要在过渡结束的时候写回调,而过渡的时间又是在CSS里面控制。

vue的版本刚升级到1.0.7,chrome和firefox都试过了。

@Hello-Tan
Copy link

你好,我现在也被这个问题困扰了,能告知我一下最后的解决方案吗,谢谢。

@bravelincy
Copy link

这个问题现在还存在,我用的是2.3.4的版本,在用transition-group的时候。

@bravelincy
Copy link

@tanrenjie @yyx990803 我发现是因为当前视图中依赖的数据在transition完成之前发生了变化,触发了transition提前结束,我在线写了一个重现的例子https://jsfiddle.net/ahcL844p/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants