在extjs面板之间拖放

时间:2015-08-12 10:36:04

标签: javascript extjs drag-and-drop extjs5

我想在面板之间实现拖放按钮。这可以通过简单的方式完成吗? I did example on Ext.ux.BoxReorderer

Ext.require(['Ext.ux.BoxReorderer']);

Ext.application({
    name : 'Fiddle',

    launch : function() {
        Ext.create("Ext.panel.Panel", {
            renderTo: Ext.getBody(),
            title: "pnl1",
            plugins: Ext.create("Ext.ux.BoxReorderer"),
            layout: {
                type: "hbox"
            },
            items: [{
                xtype: "button",
                text: "btn1"
            },{
                xtype: "button",
                text: "btn2"
            },{
                xtype: "button",
                text: "btn3"
            }]
        });

        Ext.create("Ext.panel.Panel", {
            renderTo: Ext.getBody(),
            title: "pnl2",
            plugins: Ext.create("Ext.ux.BoxReorderer"),
            layout: {
                type: "hbox"
            },
            items: [{
                xtype: "button",
                text: "btn1"
            },{
                xtype: "button",
                text: "btn2"
            },{
                xtype: "button",
                text: "btn3"
            }]
        });
    }
});

但不知道如何在面板之间实现拖放。

P.S。 ExtJS版本是5.x.x

0 个答案:

没有答案