我的 View with Tabs 中有一个 TabPanel。如何在此面板中获取选项卡的实例以及应设置哪个属性 id 或 itemId?
谢谢
openProjectMetaTab: function(project) {
var tabPanel = this.getTab();
console.log(tabPanel);
var mpItemId = 'project-metaTab-' + project.get('id')
console.log('#'+mpItemId);
var metaPanel = tabPanel.getComponent(mpItemId);
console.log(metaPanel);
if(!metaPanel) {
tabPanel.add({
title: project.get('title'),
closable: true,
items: [
{
xtype: 'projectMetaForm',
itemId: mpItemId,
},
],
}).show();
}
}