소스 검색

improve v-on warning message

Evan You 11 년 전
부모
커밋
192126fb80
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      src/directives/on.js

+ 3 - 2
src/directives/on.js

@@ -22,8 +22,9 @@ module.exports = {
   update: function (handler) {
     if (typeof handler !== 'function') {
       process.env.NODE_ENV !== 'production' && _.warn(
-        'Directive "v-on:' + this.expression + '" ' +
-        'expects a function value.'
+        'Directive v-on="' + this.arg + ': ' +
+        this.expression + '" expects a function value, ' +
+        'got ' + handler
       )
       return
     }