Skip to content

Commit b12a455

Browse files
committed
support two-way filter for two-way props
1 parent c0c3344 commit b12a455

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/directives/prop.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = {
1818
var childKey = prop.path
1919
var parentKey = prop.parentPath
2020

21-
this.parentWatcher = new Watcher(
21+
var parentWatcher = this.parentWatcher = new Watcher(
2222
parent,
2323
parentKey,
2424
function (val) {
@@ -34,7 +34,7 @@ module.exports = {
3434
)
3535

3636
// set the child initial value.
37-
var value = this.parentWatcher.value
37+
var value = parentWatcher.value
3838
if (childKey === '$data') {
3939
child._data = value
4040
} else {
@@ -51,7 +51,7 @@ module.exports = {
5151
child,
5252
childKey,
5353
function (val) {
54-
parent.$set(parentKey, val)
54+
parentWatcher.set(val)
5555
}
5656
)
5757
})

0 commit comments

Comments
 (0)