2
0
Эх сурвалжийг харах

fix partial decompile in v-if/v-partial

Evan You 11 жил өмнө
parent
commit
0bfd6e625d

+ 2 - 2
src/directives/if.js

@@ -34,7 +34,7 @@ module.exports = {
     if (value) {
     if (value) {
       this.insert()
       this.insert()
     } else {
     } else {
-      this.unbind()
+      this.teardown()
     }
     }
   },
   },
 
 
@@ -64,7 +64,7 @@ module.exports = {
     transition.before(el, ref, vm)
     transition.before(el, ref, vm)
   },
   },
 
 
-  unbind: function () {
+  teardown: function () {
     if (this.decompile) {
     if (this.decompile) {
       this.decompile()
       this.decompile()
       this.decompile = null
       this.decompile = null

+ 2 - 2
src/directives/partial.js

@@ -20,7 +20,7 @@ module.exports = {
   },
   },
 
 
   update: function (id) {
   update: function (id) {
-    this.unbind()
+    this.teardown()
     this.compile(id)
     this.compile(id)
   },
   },
 
 
@@ -58,7 +58,7 @@ module.exports = {
     }
     }
   },
   },
 
 
-  unbind: function () {
+  teardown: function () {
     if (this.decompile) {
     if (this.decompile) {
       this.decompile()
       this.decompile()
       this.decompile = null
       this.decompile = null