2013-12-09 41 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