extjs tablepanel 高度自适应问题

项目中为了给客户好点的功能切换体验,想到了用extjs的tabpanel

在页面中用了tabpanel后,高度新打开的tab页的iframe 的高度总是出现无法填满页面的情况

于是被迫给tabpanel指定了高度,为了达到自适应的效果用了

document.body.clientWidth

document.body.clientHeight 

 

代码如下:

 

		Ext.onReady(function() {
			Ext.BLANK_IMAGE_URL = 'script/extjs/resources/images/default/s.gif';
			Ext.QuickTips.init();	
			
			scrollerMenu = new Ext.ux.TabScrollerMenu({
				maxText  : 15,
				pageSize : 5
			});
			
			panel = new Ext.TabPanel({
				applyTo:document.body,
		        enableTabScroll:true,
		        activeTab:0,
		        resizeTabs:true,
		        layoutOnTabChange:true,
		        height:document.body.clientHeight,
		        plugins:['tabclosemenu',scrollerMenu],
		        defaults: {autoScroll:true},
		        items:[{
		            id: 'testPanel',
		            iconCls: 'new-tab',
		            title: '首页',
		            html:'<iframe ></iframe>',
		            closable:false,
		            autoScroll: true
		        }
		        ]
	    	});
		});

相关文章:

  • 2022-12-23
  • 2021-07-22
  • 2021-11-05
  • 2021-04-13
  • 2022-02-07
  • 2022-02-13
  • 2021-07-08
  • 2021-10-15
猜你喜欢
  • 2021-07-04
  • 2021-06-02
  • 2021-06-21
  • 2021-08-15
  • 2021-08-12
  • 2021-09-03
  • 2022-12-23
相关资源
相似解决方案