日期:2014-05-16  浏览次数:20497 次

Extjs4.0.7中的Window 的 frame 属性的问题
在Extjs4.0.7中Ext.window.Window设置frame:true的会出现问题
js代码

// JavaScript Document

Ext.onReady(function(){
					
					var _window = Ext.create('Ext.window.Window',{
									id:"loginWindow",
									title:'登录',		
									frame:true,
									width:230,		
									height:120,									
									plain:true,
									labelWidth:45,		
									resizable:false,
									buttonAlign:'center',
									collapsed:true,
									closeAction:'hide',
									defaults:{
										xtype:'textfield',
										width:180
									},		
									bodyStyle:{
										padding:'3px'
									},
									items:[
										{
											id:"account",
											fieldLabel:"帐号",
											width:300
										},{
											
											fieldLabel:"密码",
											id:'password',
											inputType:"password",
											width:300
										}
									],
									buttons:[
										{
											text:'确定',
											handler:function(){
												var account = Ext.getCmp("account").getValue();
												var password = Ext.getCmp("password").getValue();
												alert("用户名:" + account + " ,密码:" + password);
											}
										},{
											text:'取消',
											handler:function(){
												_window.hide();
											}
										}
									],
									listeners:{
										'show':function(){
											alert("窗体显现");	
										},
										'hide':function(){
											alert("窗体隐藏");
										},
										'close':function(){
											alert("窗体关闭");
										}
									}
						});		
						
						
						_window.show();	
				
				
		
			
					
			
});



效果图1:



当设置frame:false

// JavaScript Document

Ext.onReady(function(){
					
					var _window = Ext.create('Ext.window.Window',{
									id:"loginWindow",
									title:'登录',		
									frame:false,
									width:230,		
									height:120,									
									plain:true,
									labelWidth:45,		
									resizable:false,
									buttonAlign:'center',
									collapsed:true,
									closeAction:'hide',
									defaults:{
										xtype:'textfield',
										width:180
									},		
									bodyStyle:{
										padding:'3px'
									},
									items:[
										{
											id:"account",
											fieldLabel:"帐号",
											width:300
										},{
											
											fieldLabel:"密码",
											id:'password',
											inputType:"password",
											width:300
										}
									],
									buttons:[
										{
											text:'确定',
											handler:function(){
												var account = Ext.getCmp("account").getValue();
												var password = Ext.getCmp("password").getValue();
												alert("用户名:" + account + " ,密码:" + password);
											}
										},{
											text:'取消',
											handler:function(){
												_window.hide();
											}
										}
									],
									listeners:{
										'show':function(){
											alert("窗体显现");	
										},
										'hide':function(){
											alert("窗体隐藏");
										},
										'close':function(){
											alert("窗体关闭");
										}
									}
						});		
						
						
						_window.show();	
				
				
		
			
					
			
});


效果图2:



请教:这是extjs的bug还是说extjs4.x以上的版本都是这样的!求解释??