(vm, key, handler)
| 2854 | } |
| 2855 | |
| 2856 | function createWatcher (vm, key, handler) { |
| 2857 | var options; |
| 2858 | if (isPlainObject(handler)) { |
| 2859 | options = handler; |
| 2860 | handler = handler.handler; |
| 2861 | } |
| 2862 | if (typeof handler === 'string') { |
| 2863 | handler = vm[handler]; |
| 2864 | } |
| 2865 | vm.$watch(key, handler, options); |
| 2866 | } |
| 2867 | |
| 2868 | function stateMixin (Vue) { |
| 2869 | // flow somehow has problems with directly declared definition object |
no test coverage detected