当第二次弹出窗口时,窗口按钮会消失。
问题描述:
单击按钮时,我打开一个带有中止按钮的弹出窗口。并在我得到响应后向服务器发送请求,我打开带有下载按钮的新弹出窗口并关闭第一个窗口。第一次它工作正常。但第二次我的中止和下载按钮逐渐消失。当我检查弹出我可以看到中止下载按钮目前在代码端但不可见在用户界面上。当第二次弹出窗口时,窗口按钮会消失。
if (_data.status == "inProcess") {
exportPopup.show();
} else if (_data.status == "success") {
var height= exportPopup.getHeight();
exportPopup.close();
downloadPopup = Ext.create('Ext.window.Window', {
name: 'downloadReport',
header: false,
id: 'downloadPopWin',
constrain: true,
closable: false,
width: 400,
height: height,
resizable: false,
bodyStyle: 'background-color : white;',
buttonAlign: 'center',
layout: {
type: 'hbox',
align: 'center',
pack: 'center'
},
items:
{
xtype: 'label',
itemId:'exportStatus',
margin : '50 0 0 0',
text: 'Export completed.',
//style: 'font-weight: bold;'
},
buttons:[
{
//xtype: 'button',
text: 'Download',
id: "btnDownloadReport",
//margin : '20 0 20 180',
handler: function(_button) {
downloadPopup.close();
ReportUtil.downloadReportData(me, _data);
}
}
]
});
downloadPopup.show();
}
答
删除关闭的:假的,并尝试关闭的虚假手段,我们不能关闭窗口
文档: http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.window.Window-cfg-closable
+0
我认为大多可关闭:错误是问题删除可关闭它的默认值是真实的,所以它会工作 –
请提供给我的小提琴,你的问题是没有extrapopup代码还请提供那也 –