我通过以下方式从控制器传递记录:
showDetail: function (list, record) {
this.getMain().push({
xtype: 'leaddetail',
data: record.data
});
},
我的观点:
Ext.define('ApexChat.view.LeadDetail', {
extend: 'Ext.Panel',
xtype: 'leaddetail',
init: function() {
debugger;
},
config: {
styleHtmlContent: true,
scrollable: 'vertical',
title: 'Details',
frame: true,
labelwidth: 75,
items: [
{
xtype: 'fieldset',
columnWidth: 0.5,
collapsible: true,
title: 'Lead Information',
defaultType: 'textfield',
defaults: { anchor: '100%' },
layout: 'vbox',
items: [
{
fieldLabel: 'Name',
name: 'name',
tpl: '{name}',
value: '{name}',
disabled: true
},
{
fieldLabel: 'Email',
name: 'email',
value: '{email}',
disabled: true
},
{
fieldLabel: 'Phone',
name: 'phone',
value: '{phone}',
disabled: true
}
]
},
{
xtype: 'fieldset',
columnWidth: 0.5,
collapsible: true,
title: 'Exta Information',
defaultType: 'textfield',
defaults: { anchor: '100%' },
layout: 'vbox',
items: [
{
fieldLabel: 'Company Key',
name: 'companykey',
value: '{companyKey}',
disabled: true
},
{
fieldLabel: 'Chat ID',
name: 'chatid',
value: '{chatId}',
disabled: true
},
{
fieldtype: 'textarea',
fieldLabel: 'Notes',
name: 'notes',
value: '{notes}',
disabled: true
}
]
}
]
}
});
但在文本字段中我仍然看到 {companyName}
假设不能那样做,那么我如何访问从控制器传递的记录,以便我可以执行 .get('name') 或类似的操作?