Browse Source

fix watch option string

dev
Evan You 9 years ago
parent
commit
57f4b73005
  1. 3
      src/runtime/instance/state.js

3
src/runtime/instance/state.js

@ -120,6 +120,9 @@ function initWatch (vm) {
options = handler
handler = handler.handler
}
if (typeof handler === 'string') {
handler = vm[handler]
}
vm.$watch(key, handler, options)
}
}

Loading…
Cancel
Save