jee*_*iya 3 tabs extjs tabpanel extjs4
是否有任何方法可以禁用Extjs4选项卡面板上的所有子项,而无需循环它们.
我的代码:
var myPanel = new Ext.TabPanel({
region: 'east',
title: 'my panel title',
width: 200,
id: 'my-panel',
split: true,
collapsible: true,
collapsed: true,
floatable: true,
xtype: 'tabpanel',
items: [
Ext.create('Ext.panel.Panel', {
id: 'my-detail-panel',
title: 'My Info',
autoScroll: true,
file: false,
type: 'vbox',
align: 'stretch',
tpl: myDetailsTpl
}),
Ext.create('Ext.panel.Panel', {
id: 'my-more-detail-panel',
title: 'My more info',
autoScroll: true,
file: false,
type: 'vbox',
align: 'stretch',
tpl: myMoreDetailsTpl
})
]
});
Run Code Online (Sandbox Code Playgroud)
我需要禁用myPanel的所有子项,但仍需要'myPanel'保持状态为启用.
myPanel.items.each(function(c){c.disable();})
Run Code Online (Sandbox Code Playgroud)
然后
myPanel.items.each(function(c){c.enable();})
Run Code Online (Sandbox Code Playgroud)
把他们重新开火.
这是循环,但它没有使用"for循环",因为我认为问题是要陈述的.