不明白为什么要加上tab,手册没有找到相关答案呀
Ext.define ( 'Form.view.login.Login' , {
extend : "Ext.tab.Panel" ,
title : '注册表单' ,
xtype : "register" ,
width : 800 ,
height : 800 ,
autoDestroy : false ,
id : 'login' ,
activeTab : 1 ,
defaults : {
tabConfig : {
tooltip : 'tab tooltip' ,
width : 200 ,
}
} ,
items : [
{
title : '个人注册' ,
bodyPadding : 10 ,
html : '我是个人注册' ,
itemId : 'person'
} ,
{
title : '企业注册' ,
html : '我是企业注册' ,
itemId : 'company'
} ,
{
title : '其他设置' ,
itemId : 'others' ,
hidden : true ,
}
] ,
listeners : {
beforetabchange : function ( tabpanel , newCard , oldCard , opts ) {
Ext.defer ( function () {
var panel = Ext.getCmp ( 'login' );
var other = panel.child ( '#others' )
other.tab.show ()
panel.setActiveTab ( other );
} , 1000 )
}
}
} )
就是other.tab.show ()这一句,不知道为什么加上那个tab,我打出来看了的,里面没有什么show,hide方法呀,为啥子不能不加那个直接show,hide的呢?可是直接写又出错,为什么呀
var other = panel.child ( '#others' ) 后面是不是少了分号?
other.show ()按道理是没有问题的。