From beb519cb4f940e4ddd9e792540b760208e53191d Mon Sep 17 00:00:00 2001 From: Evan You Date: Wed, 13 Apr 2016 20:52:47 -0400 Subject: [PATCH] add unbind hook for runtime directives --- src/runtime/vdom/modules/directives.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/runtime/vdom/modules/directives.js b/src/runtime/vdom/modules/directives.js index 83245fe2c..bf5fd6de7 100644 --- a/src/runtime/vdom/modules/directives.js +++ b/src/runtime/vdom/modules/directives.js @@ -4,6 +4,9 @@ export default { }, update: function (oldVnode, vnode) { applyDirectives(oldVnode, vnode, 'update', true) + }, + destroy: function (oldVnode, vnode) { + applyDirectives(oldVnode, vnode, 'unbind') } }