我有嵌套列表的视图,我想知道如何将我的数据添加到嵌套列表中。
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”不起作用。