您的位置:首页 > 其它

sencha touch之carousel

2013-09-30 10:42 274 查看
carousel组件是个非常不错的东东,自带可滑动的效果,效果如下图



上面部分可以左右滑动,下面部分可以上下滑动,效果还是不错的,app程序中很有用的布局

代码如下:

Ext.application({

name:'itKingApp',
/**
* 	Carousel 组件
*/
launch:function(){
var carousel1=Ext.create('Ext.Carousel',{
ui:'dark',
flex:1,
direction:'horizontal',
items:[
{
html:'left',
style:'background-color:pink'
},
{
html:'center',
style:'background-color:green'
},
{
html:'right',
style:'background-color:blue'
}
]
});

var carousel2=Ext.create('Ext.Carousel',{
ui:'dark',
flex:1,
direction:'vertical',
items:[
{
html:'left',
style:'background-color:yellow'
},
{
html:'center',
style:'background-color:gray'
},
{
html:'right',
style:'background-color:blue'
}
]
})

var panel=Ext.create('Ext.Panel',{
layout:{
type:'vbox'},
items:[carousel1,carousel2]
});

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