简体   繁体   English

ExtJs3:如何使Tabpanel的可关闭选项卡不可关闭并返回?

[英]ExtJs3: how to make closable tab of tabpanel not closable and back?

我希望能够在选项卡标题附近隐藏“ x”按钮,并且能够显示它,而无需操纵DOM的低级代码,但如果可能的话,使用组件级api函数。

You should manually hide the close button in the DOM. 您应该在DOM中手动隐藏关闭按钮。

I tested this code over ExtJS 3 API page. 我在ExtJS 3 API页面上测试了此代码。 It toggles close button on the second tab: 它切换第二个选项卡上的关闭按钮:

var tabPanel = Ext.getCmp('doc-body');
var tabHeader = tabPanel.items.get(1).tabEl;
Ext.get(tabHeader).down('a.x-tab-strip-close').toggleClass('x-hidden')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM