2013-12-09 24 views
-1

Ext.define( 'GoV.view.Main',{ 延长: 'Ext.tab.Panel', 的xtype: '主', 要求:[ 'Ext.TitleBar', 'Ext.Video' ], 配置:{ tabBarPosition: '底部',我煎茶代码不断问我把一个逗号

items: [ 
     { 
      title: 'Welcome', 
      iconCls: 'home', 

      styleHtmlContent: true, 
      scrollable: true, 

      items: { 
       docked: 'top', 
       xtype: 'titlebar', 
       title: 'Mobile App: Government of Vanuatu' 
      }, 

      html: [ 
       '<img src ="resources/icons/logogov.png"/>', 
       '<h4>Constitution of the Republic of Vanuatu</h4>', 
       '<p>Constitution of the Republic of Vanuatu</p>' 
      ].join("") 
     }, 
     { 
      title: 'Read', 
      iconCls: 'action', 

      styleHtmlContent: true, 
      scrollable: true, 

      items: 
       { 
        docked: 'top', 
        xtype: 'titlebar', 
        title: 'constitution', 
        html: 
         '<h1>Constitution: Part One</h1>' 
       } 

} 

}); ------------->这是不断要求我输入逗号的点

回答

1

你错过了'项目'?义项的数组(直接在config-字典没有结束,他希望有更多的值)

更换

} 
    }); 

随着

}] 
    }); 

除此之外,我认为你缺少的},当你试图使这个格式更具可读性并且通过消除子子元素来消除基本元素时,这并不难。

+0

谢谢Jelle De Lander。它的工作 – IslandKing

+0

我不能投票,因为堆栈溢出要我有15个声望。当我达到15声望时我会。 – IslandKing