Extjs带子域的模型字段

Ste*_*cus 5 grid field model extjs

任何人都知道如何为ExtJS中的任何字段的子字段建模?例如

Ext.data.Model:

fields:[
   {name: 'id', type: 'int'},
   {name: 'title', type: 'string'},
   {name: 'description', type: 'string'},
   {name: 'priority', type: 'auto', fields:[
      {name: 'code', type: 'string'}
   ]},
   {name: 'createdBy', type: 'auto'},
]
Run Code Online (Sandbox Code Playgroud)

然后在我的网格面板中

Ext.grid.Panel

columns:[
    {header:'Title', dataIndex:'title', flex:1},
    {header:'Priority', dataIndex:'code'}
],
Run Code Online (Sandbox Code Playgroud)

知道如何在'优先级'下访问dataIndex'代码'吗?提前致谢!

Ste*_*cus 11

感谢@sha - 这是我需要的答案:)

模型

fields:[

            {name: 'id', type: 'int'},
            {name: 'title', type: 'string'},
            {name: 'description', type: 'string'},
            {name: 'priority', type: 'auto'},
            {name: 'code', type: 'string', mapping:'priority.code'},
            {name: 'createdBy', type: 'auto'},

        ]
Run Code Online (Sandbox Code Playgroud)

网格面板

columns:[

             {header:'Title', dataIndex:'title', flex:1},
             {header:'Description', dataIndex:'description'},
             {header:'Priority', dataIndex:'code'}

         ],
Run Code Online (Sandbox Code Playgroud)