v-bind one way and v-bind .once still allows child component to change parent component's data.
See http://jsfiddle.net/9a0uxja6/1/.
Click on one of the link "CompA" or "CompB". Edit the text in the input textbox in the child component.
The value of the parent component will be changed accordingly even if the .once modifier is used to pass the data to the child component.
See the red note section: http://rc.vuejs.org/guide/components.html#Prop_Binding_Types
You are passing down an object by reference. .once only ensures if the child sets this.comp = somethingElse it won't affect the parent. If you want a completely fresh object you need to make a deep clone yourself.
Thanks.
How about a "deep clone" modifier or just something like custom modifier? @yyx990803
@weilao you could use a custom filter for that
@fullfs Thanks, it works!
Most helpful comment
How about a "deep clone" modifier or just something like custom modifier? @yyx990803