【发布时间】:2014-12-22 13:36:29
【问题描述】:
在钛合金中,如何专门针对钛列表视图中的第一项(我只需要更改第一项的背景颜色)?
使用列表视图查看:
<ListView id="hm_channel_comments" defaultItemTemplate="hm_commentTemplate">
<ListSection name="hm_comments" id="hm_comments_section"/>
我尝试过的一些事情(总是返回“未定义”):
$.hm_channel_comments.Item[0].setBackgroundColor("blue"); //not working
$.hm_comments_section.itemIndex[0].setBackgroundColor("blue"); //not working
console.log($.hm_comments_section.itemIndex[0] + " $.hm_comments_section.itemIndex[0] "); not working
console.log($.hm_comments_section.item[0] + " $.hm_comments_section.item[0] ");
【问题讨论】: