gpt4 book ai didi

android - Sencha 触摸 : Disclosure on single item

转载 作者:行者123 更新时间:2023-11-29 00:43:51 26 4
gpt4 key购买 nike

我在 Sencha Touch 中有一个普通列表。现在我需要将该列表中的单个项目标记为“披露”项目。

功能应该是这样的:

onItemDisclosure: function(record) {
if (record.data.type != "link") return false; //not a disclosure
return true; //disclosure item
}

这有可能实现吗?

最佳答案

试试这个:

new Ext.List({
onItemDisclosure:true,
store:'Events',
itemTpl:'{date} {name}',
listeners:{
afterrender:function(cmp){
this.store.each(function(record,index,itemsCount){
if(record.data.type != "link"){
Ext.select('.x-list-disclosure',cmp.getNode(index)).remove();
}
});
},
itemtap:function(list,index,item){
var record = this.store.getAt(index);
if(record.data.type == "link"){
// do action
}
}
}
})

关于android - Sencha 触摸 : Disclosure on single item,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7703021/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com