Quellcode durchsuchen

allow dynamic set path for props

Evan You vor 11 Jahren
Ursprung
Commit
4801d7af62
1 geänderte Dateien mit 2 neuen und 6 gelöschten Zeilen
  1. 2 6
      src/directives/prop.js

+ 2 - 6
src/directives/prop.js

@@ -1,6 +1,5 @@
 var _ = require('../util')
 var _ = require('../util')
 var Watcher = require('../watcher')
 var Watcher = require('../watcher')
-var expParser = require('../parsers/expression')
 
 
 module.exports = {
 module.exports = {
 
 
@@ -40,11 +39,8 @@ module.exports = {
     child.$set(childKey, this.parentWatcher.value)
     child.$set(childKey, this.parentWatcher.value)
 
 
     // only setup two-way binding if this is not a one-way
     // only setup two-way binding if this is not a one-way
-    // binding, and the parentKey is a "settable" simple path.
-    if (
-      !this._descriptor.oneWay &&
-      expParser.isSimplePath(parentKey)
-    ) {
+    // binding.
+    if (!this._descriptor.oneWay) {
       this.childWatcher = new Watcher(
       this.childWatcher = new Watcher(
         child,
         child,
         childKey,
         childKey,