From 780c83516681f857a62bd14af950ed718b2fda6c Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 5 Jan 2018 10:11:24 +0800 Subject: [PATCH] update --- dist/fix/fix.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dist/fix/fix.js b/dist/fix/fix.js index 0568197e55..17b56748b0 100644 --- a/dist/fix/fix.js +++ b/dist/fix/fix.js @@ -1122,10 +1122,17 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons } } - function createWatcher(vm, keyOrFn, handler) { - return watch(vm.model, keyOrFn, _.bind(handler, vm.$$model ? vm.model : vm), { + function createWatcher(vm, keyOrFn, cb, options) { + if (isPlainObject(cb)) { + options = cb; + cb = cb.handler; + } + if (typeof cb === 'string') { + cb = vm[cb]; + } + return watch(vm.model, keyOrFn, _.bind(cb, vm.$$model ? vm.model : vm), _.extend({ sync: true - }); + }, options)); } function initMethods(vm, methods) {