Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/422.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 以编程方式取消隐藏sencha中列表中的项目_Javascript_Extjs_Sencha Touch - Fatal编程技术网

Javascript 以编程方式取消隐藏sencha中列表中的项目

Javascript 以编程方式取消隐藏sencha中列表中的项目,javascript,extjs,sencha-touch,Javascript,Extjs,Sencha Touch,我有一个由商店设置的列表,并由sencha中的itemtpl设置样式,如下所示: xtype: 'list', id: 'messageList', store: 'messageStore', itemTpl: mytemplate 每个列表项在itemtap和itemswipe上都有一个处理程序。Itemswipe做了一个幻灯片动画,以显示隐藏在左侧的删除按钮,并使用一些css技巧。我没有问题做动画我的问题是当一个项目是滑出,如果另一个项目是

我有一个由商店设置的列表,并由sencha中的itemtpl设置样式,如下所示:

xtype: 'list',
        id: 'messageList',
        store: 'messageStore',
        itemTpl: mytemplate
每个列表项在itemtap和itemswipe上都有一个处理程序。Itemswipe做了一个幻灯片动画,以显示隐藏在左侧的删除按钮,并使用一些css技巧。我没有问题做动画我的问题是当一个项目是滑出,如果另一个项目是滑出,我想滑回其他项目的地方

我原以为这会奏效:

var store = Ext.StoreMgr.get('messageStore');
            store.data.items[index].data.Slidout = true;
            for (var i = 0; i < store.data.items.length; i++){
                if (store.data.items[i].data.Slidout == true){
                    var items = Ext.getCmp('messageList').items;
                    //unhide items[i]
                }
            }
var-store=Ext.StoreMgr.get('messageStore');
store.data.items[index].data.slideout=true;
对于(变量i=0;i

我想问的是如何访问列表中的项目,这样我就可以通过编程在它们上启动动画。

如果我没弄错,您可以使用

编辑:

你是对的,你正在寻找的方法是


我认为getItems()会为您提供项的值。

尝试一下,它会返回ext itemcollection,但ext itemcollection只显示一个列表项…尝试一下,它会返回ext itemcollection,但ext itemcollection只显示一个列表项。。。
Ext.getCmp('messageList').getItems();
Ext.getCmp('messageList').getViewItems();