我对 ExtJS 很陌生,而且很迷茫。我创建了一个数据存储 -
var sections = Ext.create('Ext.data.Store', {
data: [
{"section" : "One"},
{"section" : "Two"},
{"section" : "Three"}
]
});
我现在想做的是为每个部分创建一个面板,使用部分名称(一、二三)作为标题。
我尝试了几种方法,所有这些方法都非常不成功。我该如何解决这个问题?
编辑 - 我试过的东西的例子
var sectionStore = Ext.getStore(sections);
var allRecords = sectionStore || sectionStore.data("section");
allRecords.each(function(record) {
Ext.define('Ext.panel.Panel', {
xtype: 'panel',
title: record,
text: record
})
console.log(record)
});