sencha touch的tabpanel里tab比较多时,使tab子标签滚动


Ext.create('Ext.tab.Panel', {

            fullscreen: true,//设置panel全屏

            tabBar: { //设置tabBar配置项,

                docked: 'bottom',//固定在底部

                layout: { //设置每个tab的位置为居中
                    pack: 'center',
                    align: 'center'
                },

                scrollable: { //设置可滚动的属性
                    direction: 'horizontal',
                    indicators: false
                }
            },

            ui  : 'light',

            defaults: { //设置默认的html,这样每个tab子页面都显示下面的html
                html: "Both toolbars and tabbars have built-in, ready to use icons. Styling custom icons is no hassle.<p><small>If you can't see all of the buttons below, try scrolling left/right.</small></p>"
            },

            // Add a bunch of items into the tabpanel, with iconCls'
            items: [ //设置每个tab的图标(sencha自带的)和标题,其中title是必须 的
                { iconCls: 'bookmarks', title: 'Bookmarks' },
                { iconCls: 'download',  title: 'Download' },
                { iconCls: 'favorites', title: 'Favorites' },
                { iconCls: 'info',      title: 'Info' },
                { iconCls: 'more',      title: 'More' },
                { iconCls: 'search',    title: 'Search' },
                { iconCls: 'settings',  title: 'Settings' },
                { iconCls: 'team',      title: 'Team' },
                { iconCls: 'time',      title: 'Time' },
                { iconCls: 'user',      title: 'User' },
            ]
        });
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值