我的Sencha代码一直要求我输入逗号

时间:2013-12-09 22:39:14

标签: extjs touch

Ext.define('GoV.view.Main',{     extend:'Ext.tab.Panel',     xtype:'main',     要求:[         'Ext.TitleBar',         'Ext.Video'     ]     config:{         tabBarPosition:'bottom',

    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>'
                }

}

}); -------------&GT;这就是一直要求我写一个逗号

1 个答案:

答案 0 :(得分:1)

你错过了'项目'了吗?意思是项目数组(直接在配置字典中没有结束,他期望更多的值)

替换

    }
    });

使用

    }]
    });

除此之外,我认为你也错过了一个},当你试图让格式更具可读性并尝试通过消除子子时剥离回基本元素时,这并不难找到。

相关问题