隐藏显示tabpanel中的items

xtype : 'tabpanel',
                    id : 'htview1',
                    items : [
                    {
                        title : id,
                        id : 'id'
                    }, {
                        title : "标的约定",
                        items : ObjectMatterAgreementRecordGrid1,
                        id : 'ObjectMatterAgreementRecordGrid1_id'
                    }]

~~~~~~~~~~~~~~~~
if (IsFrameContract == 1) {//框架合同显示标的约定页签(比较选中合同)
                    Ext.getCmp('htview1').unhideTabStripItem('ObjectMatterAgreementRecordGrid1_id');
                    Ext.getCmp('htview2').unhideTabStripItem('ObjectMatterAgreementRecordGrid2_id');
                } else if (IsFrameContract == 0) {//普通合同隐藏标的约定页签(比较选中合同)
                    Ext.getCmp('htview1').hideTabStripItem('ObjectMatterAgreementRecordGrid1_id');
                    Ext.getCmp('htview2').hideTabStripItem('ObjectMatterAgreementRecordGrid2_id');
                } else {//默认情况下为隐藏
                    Ext.getCmp('htview1').hideTabStripItem('ObjectMatterAgreementRecordGrid1_id');
                    Ext.getCmp('htview2').hideTabStripItem('ObjectMatterAgreementRecordGrid2_id');
                }

你可能感兴趣的:(tabpanel)