我的代码是,
Ext.define('notification_list_model', {
extend: 'Ext.data.Model',
fields: [{ name: 'firstName', type: 'string' },
{ name: 'lastName', type: 'string' }]
});
var notification_list_store = new Ext.data.Store({
model: notification_list_model,
data: [
{ firstName: 'Berkan', lastName: 'Kahya' },
{ firstName: 'Ahmet', lastName: 'Mutlu' },
{ firstName: 'Ahmet', lastName: 'Mutlu' },
{ firstName: 'Ahmet', lastName: 'Mutlu' }
],
});
var notification_list = new Ext.List({
store: notification_list_store,
itemTpl: '<div>{firstName}</div>',
flex: 1
});
listview 看到数据但 firstName 文本不打印