@@ -40,23 +40,24 @@ var transition = module.exports = function (el, stage, cb, compiler) {
4040 return codes . INIT
4141 }
4242
43- var transitionId = el . vue_trans ,
44- isAnimation = el . vue_anim === ''
43+ var hasTransition = el . vue_trans === '' ,
44+ hasAnimation = el . vue_anim === '' ,
45+ effectId = el . vue_effect
4546
46- if ( transitionId ) {
47+ if ( effectId ) {
4748 return applyTransitionFunctions (
4849 el ,
4950 stage ,
5051 changeState ,
51- transitionId ,
52+ effectId ,
5253 compiler
5354 )
54- } else if ( transitionId === '' || isAnimation ) {
55+ } else if ( hasTransition || hasAnimation ) {
5556 return applyTransitionClass (
5657 el ,
5758 stage ,
5859 changeState ,
59- isAnimation
60+ hasAnimation
6061 )
6162 } else {
6263 changeState ( )
@@ -70,7 +71,7 @@ transition.codes = codes
7071/**
7172 * Togggle a CSS class to trigger transition
7273 */
73- function applyTransitionClass ( el , stage , changeState , isAnimation ) {
74+ function applyTransitionClass ( el , stage , changeState , hasAnimation ) {
7475
7576 if ( ! endEvents . trans ) {
7677 changeState ( )
@@ -84,7 +85,7 @@ function applyTransitionClass (el, stage, changeState, isAnimation) {
8485 existingCallback = el . vue_trans_cb ,
8586 enterClass = config . enterClass ,
8687 leaveClass = config . leaveClass ,
87- endEvent = isAnimation
88+ endEvent = hasAnimation
8889 ? endEvents . anim
8990 : endEvents . trans
9091
@@ -99,14 +100,14 @@ function applyTransitionClass (el, stage, changeState, isAnimation) {
99100 if ( stage > 0 ) { // enter
100101
101102 // set to hidden state before appending
102- if ( ! isAnimation ) {
103+ if ( ! hasAnimation ) {
103104 classList . add ( enterClass )
104105 }
105106 // append
106107 changeState ( )
107108 job = { }
108109 // trigger transition
109- if ( ! isAnimation ) {
110+ if ( ! hasAnimation ) {
110111 job . execute = function ( ) {
111112 classList . remove ( enterClass )
112113 }
@@ -154,9 +155,9 @@ function applyTransitionClass (el, stage, changeState, isAnimation) {
154155
155156}
156157
157- function applyTransitionFunctions ( el , stage , changeState , functionId , compiler ) {
158+ function applyTransitionFunctions ( el , stage , changeState , effectId , compiler ) {
158159
159- var funcs = compiler . getOption ( 'transitions ' , functionId )
160+ var funcs = compiler . getOption ( 'effects ' , effectId )
160161 if ( ! funcs ) {
161162 changeState ( )
162163 return codes . JS_SKIP
0 commit comments