我有一个嵌套列表的视图,我想知道如何将我的数据添加到嵌套列表中。
Ext.define('app.view.myview', {
extend: 'Ext.Panel',
config: {
layout: 'vbox',
fullscreen: true,
items: [
{
xtype: 'horizontallistview',
id: 'oldotheruserhorizontallistview',
data: **this.data.otheruser.cards**,
flex: 1,
},
{
xtype: 'horizontallistview',
data: **this.data.thisuser.cards**,
flex: 1,
}
],
}});
我的商店是这样的:
data: [
{
id : 20001,
thisuser: {
cards: [
{
typeid: 5,
quantity:12,
},
{
typeid: 5,
quantity:12,
},
{
typeid: 5,
quantity:12,
},
]
},
otheruser: {
cards: [
{
typeid: 5,
quantity:12,
},
{
typeid: 5,
quantity:12,
},
{
typeid: 5,
quantity:12,
},
]
},
},]
它是如何工作的?就像我现在的“data.this.data.otheruser.cards”不起作用。