我想提供一个具有下拉刷新功能的列表。 下面是我的代码,其中有一个面板,里面有一个列表。
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,从那时起列表就消失了。 当我删除插件时,列表显示正常。
请让我知道哪里出错了。
提前致谢。
最佳答案
您可以尝试将 flex 属性添加到列表中。
但如果没有插件显示列表,则case在插件中
关于javascript - Sencha touch 2.2 中未显示列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16230936/