【发布时间】:2014-02-26 03:40:34
【问题描述】:
我在我的项目中使用 Sencha Touch 2.3.0。而且我的项目需要其中的可排序列表...只需拖放列表项即可更改存储顺序。
似乎Ext.plugin.SortableList 存在这种精致的功能,但我无法让它按照我的意愿运行。虽然我已将此插件添加到我的列表中,但所有项目都被卡住并且无法移动。和以前一样。
这是我目前实现的。
Ext.define('ImageGallery.view.ImagePreferences', {
extend: 'Ext.Container',
xtype: 'image_preference_view',
requires: [
'Ext.plugin.SortableList',
],
config: {
title: 'Image Preferences',
items: [
{
xtype: 'list',
disableSelection: true,
style: 'width: 100%; height: 100%; border-top: 1px solid white; background-color: white;',
itemTpl: '<div class = "m_li_preference">\
<div class = "m_switch_no_dp">OFF</div>\
<div class = "m_switch_yes_dp">ON</div>\
</div>',
id: 'id_list_preferences',
store: 'id_preference_store',
scrollable: false,
deselectOnContainerClick: true,
plugins: [
{
xclass: 'Ext.plugin.SortableList',
}
]
},
],
}
});
当然,我认为不可能通过这么简单的步骤来完成。所以我希望任何有这个问题经验的人帮助我。任何说明将不胜感激。
谢谢。
【问题讨论】:
-
您可能需要在商店或列表中配置一些内容。
-
请详细告诉我应该配置哪些内容...谢谢。
标签: javascript jquery html sencha-touch