在更改与 中的单个属性相对应的输入文本字段后ItemView,我会更新CompositeView.
更新在模型中运行良好,但只有与最后编辑的输入文本字段对应的 ItemView 才会在 DOM 中显示新属性,因为它是唯一调用CompositeView其onRender方法的元素:
onRender: function() {
this.$el.html(this.template(this.model.toJSON()));
return this;
}
我想onRender()在ItemViews. CompositeView我怎样才能做到这一点?