2

我想提供一個拉列表來刷新功能。 下面是我的代碼,我有一個面板,裏面,我有一個列表。列表沒有顯示在Sencha觸摸2.2

Ext.define('MyProj.common.view.notes.NotesOverlay', { 
    extend: 'Ext.form.Panel', 
    xtype: 'notesOverlay', 

    config: { 

     style: 'box-shadow: 10px 10px 5px #888888;border-radius: 20px;', 
     items: [{ 
       // Toolbar to be displayed on the Notes overlay 
       xtype: 'toolbar', 
       ui: 'light', 
       docked: 'top', 
       //margin:'0 0 20 0', 
       // id:'notesbar', 
       items: [] 
      }, 
      // List that contains the list of notes 
      { 
       xtype: 'list', 
       height: 500, 
       allowDeselect: true, 
       action: 'notesList', 
       itemTpl: '{title}', 
       data: [{ 
         title: 'Item 1' 
        }, { 
         title: 'Item 2' 
        }, { 
         title: 'Item 3' 
        }, { 
         title: 'Item 4' 
        } 
       ], 

       plugins: [{ 
         xclass: 'Ext.plugin.PullRefresh', 
         pullRefreshText: 'Pull down to refresh the list' 
        } 
       ] 


      }, 

     ] 
    } 
}); 

我已經在列表中包含了pullRefresh插件,如上所示。 兩天前我升級了項目的sencha touch框架到2.2,從此之後就不見了。 當我刪除插件列表顯示正常。

請讓我知道我會出錯的地方。

在此先感謝。

+1

閱讀評論在這裏:http://docs.sencha.com/touch/2.2.0/#!/api/Ext.plugin.PullRefresh - 看起來像是與PullRefresh插件和最近的ST兼容性問題。 – sha 2013-04-26 16:09:16

回答

1

您可以嘗試將flex屬性添加到列表中。

但是,如果沒有插件顯示的列表,此案在插件