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