1

我的测试代码如下所示:

Ext.Loader.setConfig({enabled:true});
Ext.Loader.setPath("Ext.ux", "http://cdn.sencha.io/ext-4.2.0-gpl/examples/ux");
Ext.require("Ext.ux.IFrame");
Ext.onReady(function()
{
    new Ext.container.Viewport(
    {
        items:
        [
            {
                xtype:"label",
                text:"Drag Source",
                style:"background:black;color:white;padding:20px",
                listeners:
                {
                    afterrender:function()
                    {
                        this.dragZone = new Ext.dd.DragZone(this.el,
                        {
                            getDragData: function (e)
                            {
                                var sourceEl = e.getTarget();
                                if(sourceEl)
                                {
                                    var d = sourceEl.cloneNode(true);
                                    d.id = Ext.id();
                                    return{
                                        sourceEl: sourceEl,
                                        ddel: d
                                    };
                                }
                            }
                        });
                    }
                }
            },
            {
                xtype:"uxiframe",
                width:"100%",
                height:"100%",
                src:"http://google.com"
            }
        ]
    });
})

当标签拖到“uxiframe”上时,“Ext.dd.DragZone”将不起作用。但它在 Opera 和 Chrome 等其他浏览器上运行良好。

感谢您提前提供任何帮助!

4

0 回答 0