我是 Marionette 新手,我想创建一个具有两列和多行的动态网格状结构。我真的很困惑如何创建恰好两列,并具有类似网格的结构。 提前致谢
最佳答案
更好的方法 - 使用 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,
});
关于javascript - 如何使用 marionette.js 制作动态 GridView ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26708532/