摘自 json 文件...
{
"items": [
{
"xtype": "tabbarcontext",
"ptype": "tabbarcontext",
"pstype": "maintab",
"activeTab": 0,
//"title": "NotTitleConfig",
"config": [
{"title": "TitleConfig"}
],
"items": [
{
"xtype": "panel",
"ptype": "tab",
"layout": {
"type": "border"
},
当这个 json 被戳到视口中时......
Ext.apply(me, {
// we are adding TabBar with 4 tabs to Viewport
items: appItems // json retrieved from store
选项卡面板已创建,activeTab = 0,但 config: 尚未设置标题。在 json 文件中注释代码 "title": "NotTitleConfig" 确实设置了选项卡标题。为什么是这样?蒂亚。