我是木偶的新手,我想创建一个具有两列和多行的动态网格状结构。我真的很困惑如何创建两列,并具有网格状结构。 提前致谢
答案 0 :(得分:1)
更好的方法 - 使用CompositeView
// A Grid Row
var GridRow = Backbone.Marionette.ItemView.extend({
template: "#row-template",
tagName: "tr"
});
// The grid view
var GridView = Backbone.Marionette.CompositeView.extend({
tagName: "table",
template: "#grid-template",
itemView: GridRow,
});