0

I have put this code into app/view/ViewCarousel.js

The code is copy-paste from here: http://docs.sencha.com/touch/2-0/#!/guide/carousel

But nothing happens. There's no Carousel in the browser.

What could be happening?

Thank you very much.

var carousel = Ext.define('abril16.view.ViewCarousel', {
    extend: 'Ext.Carousel',
    fullscreen: true,


    items: [
        {
            xtype: 'list',


            items: {
                xtype: 'toolbar',
                dock: 'top',
                title: 'Sencha Touch Team'
            },


            store: {
                fields: ['name'],
                data: [
                    {name: 'Rob'},
                    {name: 'Ed'},
                    {name: 'Jacky'},
                    {name: 'Jamie'},
                    {name: 'Tommy'},
                    {name: 'Abe'}
                ]
            },


            itemTpl: '{name}'
        },
        {
            xtype: 'fieldset',
            items: [
                {
                    xtype: 'toolbar',
                    dock: 'top',
                    title: 'Login'
                },
                {
                    xtype: 'textfield',
                    label: 'Name'
                },
                {
                    xtype: 'passwordfield',
                    label: 'Password'
                }
            ]
        }
    ]
});
4

1 回答 1

0

您需要将轮播项目放在配置对象中

var carousel = Ext.define('abril16.view.ViewCarousel', {
    extend: 'Ext.Carousel',
    fullscreen: true,
    config:{
    items: []
    }
});
于 2012-04-20T18:48:56.390 回答