【发布时间】:2014-07-29 16:09:17
【问题描述】:
我通过使用 for 循环从 JSON 存储中的数组加载数据来创建数据视图列表。因此,CSS 应用于整个数据视图而不是单个元素。
{
xtype: 'dataview',
store: 'AnswerStore',
flex:8,
height: 600,
width: '100%',
style: 'background-color:gray; padding: 10px;',
itemTpl: [
'<tpl for=".">',
'<tpl for="questionAnswers">',
'<div>{answer}</div>',
'</tpl>',
'</tpl>'
],
onItemTap: function (container, target, index, e) {
var me = this;
this.setStyle('color:red');
}
【问题讨论】:
标签: extjs sencha-touch dataview