Skip to content

Commit 6f112ff

Browse files
committed
support two-way filter for two-way props
1 parent a95db2e commit 6f112ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/directives/internal/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-
_.initProp(child, prop, this.parentWatcher.value)
37+
_.initProp(child, prop, parentWatcher.value)
3838

3939
// setup two-way binding
4040
if (prop.mode === bindingModes.TWO_WAY) {
@@ -46,7 +46,7 @@ module.exports = {
4646
child,
4747
childKey,
4848
function (val) {
49-
parent.$set(parentKey, val)
49+
parentWatcher.set(val)
5050
}
5151
)
5252
})

0 commit comments

Comments
 (0)