点击煎茶触摸事件 [英] Click events in Sencha touch
本文介绍了点击煎茶触摸事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的列表项的复选框,我想单独同时处理(复选框选中/清除和列表项点击)这些事件。我怎样才能做到这一点?我是新来煎茶触摸,请帮助我。
现在我可以点击复选框,但listItemTap事件获取调用。
I have checkboxes in my list item, I want to handle both( checkbox check/uncheck and list item click) these events separately. How can I do this?? I am new to sencha touch, please help me. For now I am able to click on the checkboxes but the listItemTap event is getting called.
推荐答案
使用事件参数来获取目标,如下所示: -
Use the event parameter to get the target, like this:-
itemTapFn: function(list, index, target, record, e) {
if (e.target.type === 'checkbox') {
/* checkbox click functionality */
} else {
/* do itemtap functionality */
}
}
这篇关于点击煎茶触摸事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文