View 如何在sencha touch 2中创建这样的视图?
我需要在sencha touch中创建这样的视图。我是初学者。请帮帮我。我没有收到组件上的tap事件 我的代码View 如何在sencha touch 2中创建这样的视图?,view,sencha-touch,sencha-touch-2,View,Sencha Touch,Sencha Touch 2,我需要在sencha touch中创建这样的视图。我是初学者。请帮帮我。我没有收到组件上的tap事件 我的代码 config: { defaults: { margin: 10 }, layout: { type: 'hbox' }, items: [{ flex:1, layout: { type: 'vbox' }, items: [
config: {
defaults: {
margin: 10
}, layout: {
type: 'hbox'
},
items: [{
flex:1,
layout: {
type: 'vbox'
},
items: [
{
xtype: 'component', flex: 10,
html: 'Flex: 1', style: 'background-color: lightgray'
},
{
xtype: 'spacer',flex:1
},
{
xtype: 'component', flex: 10,
html: 'Flex: 2', style: 'background-color: pink'
}
]
}, {
flex: 1,
layout: {
type: 'vbox'
},
items: [
{
xtype: 'component', flex: 10,
html: 'Flex: 3', style: 'background-color: orange',
handler:function() {
console.log('Tapped !');
}
},
{
xtype: 'spacer',flex:1
},
{
xtype: 'component', flex: 10,
html: 'Flex: 4', style: 'background-color: lightblue'
}
]
}]
请尝试Ext.dataview.dataview。您将从github获得示例。请发布您尝试过的代码。@Harikishnan我对您的问题投了反对票,因为您没有展示您尝试过的内容,只是让他人为您工作。但不要连续向下投票给其他用户作为报复,因为您的帐户可能会因为投票违规而被暂停。您认为tap事件不起作用的原因是Ext.Component没有处理程序配置。Ext.Button只有一个处理程序配置