Skip to content

Commit 52f6cfc

Browse files
committed
Merge pull request #2066 from gebilaoxiong/dev
在$watch方法中初始化Wather的时候,user选项是不是漏写了?
2 parents aff86c7 + 5d2669d commit 52f6cfc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/directive.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ Directive.prototype._setupParamWatcher = function (key, expression) {
215215
called = true
216216
}
217217
}, {
218-
immediate: true
218+
immediate: true,
219+
user: false
219220
})
220221
;(this._paramUnwatchFns || (this._paramUnwatchFns = [])).push(unwatch)
221222
}

src/instance/api/data.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ export default function (Vue) {
8383
var watcher = new Watcher(vm, expOrFn, cb, {
8484
deep: options && options.deep,
8585
sync: options && options.sync,
86-
filters: parsed && parsed.filters
86+
filters: parsed && parsed.filters,
87+
user: !options || options.user !== false
8788
})
8889
if (options && options.immediate) {
8990
cb.call(vm, watcher.value)

0 commit comments

Comments
 (0)