在我尝试实现 rowexpander 插件之前,我的面板显示正常:
Ext.define('AM.view.userlist.List' ,{
extend: 'Ext.grid.Panel',
alias: 'widget.userlist',
title: '<center>Results</center>',
store: 'User',
collapsible: true,
plugins: [{
ptype: 'rowexpander',
id: 'rowexpander',
rowBodyTpl : [
'<p>Name <b>{name}</b></p>',
'<p><b>Address {address}</b></p>'
]
}],
collapsible: true,
animCollapse: false,
initComponent: function() {
this.columns = [
{header: 'ID', dataIndex: 'id', flex: 4, tdCls: 'grid_cell'},
{header: 'Name', dataIndex: 'name', flex: 4, tdCls: 'grid_cell'},
{header: 'Address', dataIndex: 'address', flex: 3, tdCls: 'grid_cell'},
{header: 'Phone', dataIndex: 'phone', flex: 3, tdCls: 'grid_cell'}
];
this.callParent(arguments);
//remaining code...
当我尝试添加插件时,我得到了这个异常:
TypeError: name is undefined
我不知道为什么我不能让它工作。有任何想法吗?