0
我通过点击图标actioncolumn创建与ExtJS的4一个窗口代码:窗口closeAction错误
{
xtype:'actioncolumn',
width: 20,
items: [
{
tooltip: 'Log',
icon: '/img/details.gif',
handler: function(grid, rowIndex) {
var store = grid.getStore();
var record = store.getAt(rowIndex);
var ba = Ext.createByAlias('widget.ba');
ba.setTitle(ba.title + record.get('name'));
ba.down('grid').getStore().load({
params:{
id: record.get('id'),
},
});
ba.show();
},
},
]
},
我的窗口中有 “closeAction: '摧毁'”:
Ext.define('BB.view.Ba', {
extend: 'Ext.window.Window',
alias: 'widget.ba',
title: 'Log ',
layout: 'fit',
width: 500,
closeAction: 'destroy',
items: {
xtype: 'gridpanel',
store: 'Bas',
selType: 'rowmodel',
columns: [
{
dataIndex: 'order_id',
width: 60,
text: 'order id',
}, {
dataIndex: 'time',
width: 100,
text: 'time',
}, {
dataIndex: 'summ',
width: 80,
text: 'summ',
renderer: function(value) {
return value.toFixed(2);
},
}, {
dataIndex: 'comment',
width: 220,
text: 'comment',
},
],
//bbar: Ext.createByAlias('widget.paging'),
},
});
,你可以请参阅窗口由别名'widget.ba'调用。因此,当我第一次单击actioncolumn图标时,永久继续顺利进行,但是如果关闭该窗口(单击窗口右上角的“cross”)并再次单击actioncolumn图标,我会看到“Uncaught TypeError:在控制台日志中无法读取属性'undefined'的样式,并且它被抛出“ba.show();”脚本的行。窗口不显示,但在其他点击图标窗口渲染后,但它不是一个实际上是一个窗口,它被渲染为视口的简单面板。
为什么如果“closeAction”设置为“销毁”,那么存在这样的问题?
谢谢。