我只是在学习 backgrid.js 的基础知识。因此,当我尝试在主页Backgrid.js上复制代码时,由于在为列传递对象数组时出现特定错误,我无法呈现网格。我相信我使用了正确的格式
var columns = [
{ name: "name", label: "Name", cell: "string" },
{ name: "address", label: "Address", cell: "string" },
{ name: "tel", label: "Phone", cell: "integer" },
{ name: "email", label: "Email", cell: "string" },
{ name: "type", label: "Contact Type", cell: "string" }
];
在这一步初始化网格的过程中出现Uncaught TypeError: Object [object Object] has no method 'listenTo'的错误:
var grid = new Backgrid.Grid({
columns: columns,
collection: this.collection
});
我如何初始化网格有问题吗?