extjs window显示在顶层

mac2022-06-30  65

最开始的样式:

完成后的样式:

下面是代码:

var win = new top.Ext.Window({ title: menuReferenceObj.patientName+'--病历--'+menuReferenceObj.title, layout:'fit', height: 537, width: 800, closeAction:'close', plain: true, modal : true, html : '<iframe id="ifrm" scrolling="auto" frameborder="0" width="100%"height="100%" src="/xxx/'+menuReferenceObj.patientNo+menuReferenceObj.code+'.html"></iframe>' }); win.show(this); 需要在加上top就OK了,但是需要注意,有时候会报找不到top.Ext.Window

你需要在Ext的代码里面写,

InpatientViewPanel=Ext.extend(Ext.grid.GridPanel,{

constructor:function(){

InpatientViewPanel.superclass.constructor.call(this,{});

},

showWindow:function(){

//上面粘贴的代码 这样写是OK的

}

});

转载于:https://www.cnblogs.com/J2EEPLUS/archive/2012/04/20/2487883.html

最新回复(0)