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