我想问一下,在 sencha touch 开发应用程序时,可以在 TabPanel 中添加 Carousel 吗?我只想添加一个名为画廊的标签并将一些图像放在轮播中..请帮助..
代码如下...
Ext.application({
name: 'Employee Form',
launch: function () {
Ext.create('Ext.TabPanel', {
extend: 'Ext.Carousel',
fullscreen: true,
defaults: {
styleHtmlContent: true
},
layout: {
animation: {
type: 'slide'
}
},
items: [
{
title: 'Home',
html: 'You are on the Home Screen Now' + ['<center><img width="100%" height="350px" src="http://staging.sencha.com/img/sencha.png" /></center>'].join(""),
items: [
{
xtype: 'toolbar',
html: '<center>Muhammad Burhan</center>',
docked: 'bottom',
}
]
},
{
title: 'Gallery',
items: [
{
xtype: 'carousel',
direction: 'vertical',
items: [
{
html: 'Welcome' + ['<center><img width="60%" height="100%" src="lib/touch/img/welcome.gif"</center>'].join(),
},
{
html: 'First Picture' + ['<center><img width="100%" height="100%" src="lib/touch/img/pic.jpg" /></center>'].join(""),
}
]
}
]
},