Explorar el Código

return event handler return value

Evan You hace 12 años
padre
commit
52c535be89
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/directives/on.js

+ 2 - 1
src/directives/on.js

@@ -21,8 +21,9 @@ module.exports = {
         this.handler = function (e) {
             e.targetVM = vm
             context.$event = e
-            handler.call(context, e)
+            var res = handler.call(context, e)
             context.$event = null
+            return res
         }
         this.el.addEventListener(this.arg, this.handler)
     },