Clear all elements of a carousel - Sencha

假如想象 提交于 2019-12-10 16:21:22

问题


Dows anybody knows how to delete all elements on a carousel in sencha???

carousel = new Ext.Carousel({
    fullscreen: true,
    defaults: {
        cls: 'carousel-item'
    },
    items: [{
            id:'tab-1',
            html: '',
            cls: 'card card1'
        },{
            id:'tab-2',
            html: '<p>Clicking on either side of the indicators below</p>',
            cls: 'card card2'
        },{
            id:'tab-3',
            html: 'Card #3',
            cls: 'card card3'
        }]
});

Thanks a lot


回答1:


You can clear all the components inside your carousel with just a line of code:

carousel.removeAll();

Hope this helps.



来源:https://stackoverflow.com/questions/6190094/clear-all-elements-of-a-carousel-sencha

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!