我想使用第三方图像库,它需要用一个字符串值实例化,该字符串值用于对应的DIV ID。
有了这个,我想用
Ext.tab.Panel
能够在第三方图像库的每个实例化实例之间切换。
我正在努力为每个标签的容器设置DIV的ID。
例如:
Ext.define('MYAPP.view.MainView', {
extend: 'Ext.panel.Panel',
xtype: 'mainview',
controller: 'mainviewcontroller',
layout: 'fit',
tbar: [{
xtype: 'somebuttons',
}],
items: [{
xtype: 'imagetab',
title: 'tab1',
items: [{
xtype: 'container',
html: '
}]
}, {
xtype: 'imagetab',
title: 'tab2',
items: [{
xtype: 'container',
html: '
}]
}]
});
然后在
MainView
管制员,我听
onBoxReady
事件并用名称实例化第三方图像库的每个实例
instance1
和
instance2
(与选项卡容器DIV ID相同)。
第三方图像库实例化良好,但图像未显示。当我检查每个选项卡对应的容器时,DIV ID并不是我将其设置为上面的内容。
即。:
html: '