windy 7 years ago
parent
commit
c60c448036
  1. 13
      dist/fix/fix.js

13
dist/fix/fix.js vendored

@ -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) {

Loading…
Cancel
Save