Răsfoiți Sursa

do not trigger transitions during compilation

Evan You 11 ani în urmă
părinte
comite
2cfe2ab435
2 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 1 0
      src/api/lifecycle.js
  2. 1 0
      src/transition/index.js

+ 1 - 0
src/api/lifecycle.js

@@ -31,6 +31,7 @@ exports.$mount = function (el) {
     var linker = compile(el, options)
     linker(this, el)
   }
+  this._isCompiled = true
   this._callHook('compiled')
   if (_.inDoc(this.$el)) {
     this._callHook('attached')

+ 1 - 0
src/transition/index.js

@@ -81,6 +81,7 @@ var apply = exports.apply = function (el, direction, op, vm) {
   var transData = el.__v_trans
   if (
     !transData ||
+    !vm._isCompiled ||
     // if the vm is being manipulated by a parent directive
     // during the parent's compilation phase, skip the
     // animation.