2016-08-18 125 views
2

单击按钮时,我打开一个带有中止按钮的弹出窗口。并在我得到响应后向服务器发送请求,我打开带有下载按钮的新弹出窗口并关闭第一个窗口。第一次它工作正常。但第二次我的中止和下载按钮逐渐消失。当我检查弹出我可以看到中止下载按钮目前在代码端但不可见在用户界面上。当第二次弹出窗口时,窗口按钮会消失。

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(); 
     } 
+0

请提供给我的小提琴,你的问题是没有extrapopup代码还请提供那也 –

回答