我目前正在从事一个具有如下组件结构的项目
包含项的父组件
该组件在this.items上有一个v-for
。
v-for
有一个
ChildComponent包含一种表单,该表单通过v模型为每个属性修改this.item
的属性。
我期望,因为VueJS默认不支持双向数据绑定,所以ParentComponent不会知道我在ChildComponent中所做的更改。 但是,由于ChildComponent是一个模式对话框,因此我可以看到在ChildComponent中所做的更改反映在ParentComponent中。
就我所见,我不理解...
有人可以帮我一下吗?