【发布时间】:2011-07-25 16:12:46
【问题描述】:
我今天早上开始使用 Sencha Touch,我需要一些帮助。
如果我像这样创建一个nestedList:
var data = {
text: 'Groceries',
items: [{
text: 'Ninja',
items: [{
text: 'Water',
items: [{
text: 'Sparkling',
leaf: true
},{
text: 'Still',
leaf: true
}]
},{
text: 'Coffee',
leaf: true
},{
text: 'Espresso',
leaf: true
},{
text: 'Redbull',
leaf: true
},{
text: 'Coke',
leaf: true
},{
text: 'Diet Coke',
leaf: true
}]
}],{
text: 'Fruit',
items: [{
text: 'Bananas',
leaf: true
},{
text: 'Lemon',
leaf: true
}]
},{
text: 'Snacks',
items: [{
text: 'Nuts',
leaf: true
},{
text: 'Pretzels',
leaf: true
},{
text: 'Wasabi Peas',
leaf: true
}]
},{
text: 'Empty Category',
items: []
}]
};
如何将图像添加到列表中?例如,如果我想将可口可乐标志放在无糖可乐旁边。我尝试在里面设置一个图像的html,但这只是给了我一个空白项。尽管有“文本”属性,但我找不到任何关于如何操作列表项的信息。我知道这是可能的,因为我看到了一个示例,其中包含带有联系人照片的联系人列表。
希望你能帮助我,提前谢谢你。
【问题讨论】:
-
您能否发布一个当前工作示例,说明您目前拥有的内容
标签: image sencha-touch extjs nested-lists