Ext.setup({
icon: 'icon.png',
glossOnIcon: false,
onReady: function() {
Ext.regModel('Contact', {
fields: ['firstName', 'lastName', 'imgURL']
});
var store = new Ext.data.JsonStore({
model : 'Contact',
sorters: 'lastName',
getGroupString : function(record) {
return record.get('lastName')[0];
},
data: [
{firstName: 'Tommy', lastName: 'Maintz', imgURL:'myImage.png'},
{firstName: 'Rob', lastName: 'Dougan', imgURL:'myImage.png'},
{firstName: 'Ed', lastName: 'Spencer', imgURL:'myImage.pngg'},
{firstName: 'Jamie', lastName: 'Avins', imgURL:'myImage.png'},
]
});
var list = new Ext.List({
fullscreen: true,
itemTpl : '<img src="{imgURL}" width="20" heigh="20"></img><span>{firstName} {lastName}</span>',
//grouped : true,
//indexBar: true,
store: store
});
list.show();
}
});
如何在extjs touch List控件中在item行添加图片
最新推荐文章于 2021-05-27 10:38:49 发布