您的位置:首页 > 其它

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

2014-10-30 15:09 477 查看
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' },

]

});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: