【发布时间】:2019-03-23 18:13:27
【问题描述】:
我在这里创建了一个小提琴。我的问题是如何为 Aircraft Name 和 Operator Name 列分配 DataIndex。
https://fiddle.sencha.com/#view/editor&fiddle/2qs9
我不想这样做
{name: 'operator', type: 'auto'},
{name: 'operatorId', type: 'string', mapping:'operator.id'},
{name: 'operatorName', type: 'string', mapping:'operator.name'}
然后使用 operatorName 作为 Grid 中的 DataIndex,因为我的原始数据在数组和模式嵌套对象中更加复杂,这意味着我需要展平整个数据结构。
【问题讨论】:
标签: javascript json extjs grid