[英]Stop the itemtap event when I tap in a button which is inside the item list, and keep the itemtap event if I press anywhere outside the button
您必须在按钮点击处理程序中包含event.stopEvent()。 这就对了。 :)
declineRequestButtonTap: function (self,event) {
console.log('decline button tap functionality'); //your code
event.stopEvent(); //this stops the itemtap event
},
onRequestItemTap: function (list, idx, el, record) {
console.log('I didn't press the button I pressed anywhere out of the button but inside the item list.') //your code
},
或者如果您在视图内有监听器
xtype: 'button',
flex: 1,
text: 'decline',
ui: 'decline',
listeners: {
tap: function (self,event) {
//your code
event.stopEvent();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.