0.12.0-beta5
Pre-releaseImprovements
-
Transition system refactor: CSS transitions and JavaScript transition hooks can now work together! The list of available JavaScript hooks have also been expanded. Here is a list of all available hooks:
beforeEnter
enter
afterEnter
beforeLeave
leave
afterLeave
You can use these hooks to do additional work while having the CSS part handled for you automatically. The refactor maintains backwards compatibility so your old transitions should still work. One important thing to note though: the
done
callback inenter
andleave
hooks is now optional, similar to how it is optional in a Mocha test. Vue will look at the number of arguments of the function to determine whether the hook expects to control when the transition should end. For example:{ enter: function (el) { // No `done` argument, so the end of the transition // will depend on the CSS `transitionend` or // `animationend` event. } }
vs.
{ enter: function (el, done) { // the `done` callback here indicates that you want // to explicitly control when the transition should end. // the transition will only end when you call this callback. } }
-
New instance method:
vm.$nextTick
. This is the same asVue.nextTick
, except that it can be called inside instance methods asthis.$nextTick
, and the callback'sthis
context will be auto-bound to the current instance. This avoids having to require the globalVue
inside a component module just to useVue.nextTick
. -
Optimized instance initialization, which increases first-render performance by roughly 30%.