Skip to content

Commit 5d2669d

Browse files
author
xiongyang
committed
[fix]方法中初始化Watcher的时候遗漏了user选项
1 parent ebb34c0 commit 5d2669d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default function (Vue) {
8484
deep: options && options.deep,
8585
sync: options && options.sync,
8686
filters: parsed && parsed.filters,
87-
user: true
87+
user: !options || options.user !== false
8888
})
8989
if (options && options.immediate) {
9090
cb.call(vm, watcher.value)

0 commit comments

Comments
 (0)