本帖最后由 fixed_2008 于 2011-07-18 15:56:33 编辑

解决方案 »

  1.   

    我查了下API,app里只有application和controller,只能帮你顶下啦
      

  2.   


    我也很无奈可是 Ext4.0 代码里的确有这个东西(Ext.app.Portal),
    还有就是 xtype: 'portalpanel',  这个类型我在API 也没看到。郁闷死了
    网上也没有例子。只能自己闷了
      

  3.   

    我只找到了个PortalPanel的源码 也可以琢磨推敲下
    Ext.define('Ext.app.PortalPanel', {
        extend: 'Ext.panel.Panel',
        alias: 'widget.portalpanel',
        requires: [
            'Ext.layout.component.Body'
        ],    cls: 'x-portal',
        bodyCls: 'x-portal-body',
        defaultType: 'portalcolumn',
        componentLayout: 'body',
        autoScroll: true,    initComponent : function() {
            var me = this;        // Implement a Container beforeLayout call from the layout to this Container
            this.layout = {
                type : 'column'
            };
            this.callParent();        this.addEvents({
                validatedrop: true,
                beforedragover: true,
                dragover: true,
                beforedrop: true,
                drop: true
            });
            this.on('drop', this.doLayout, this);
        },    // Set columnWidth, and set first and last column classes to allow exact CSS targeting.
        beforeLayout: function() {
            var items = this.layout.getLayoutItems(),
                len = items.length,
                i = 0,
                item;        for (; i < len; i++) {
                item = items[i];
                item.columnWidth = 1 / len;
                item.removeCls(['x-portal-column-first', 'x-portal-column-last']);
            }
            items[0].addCls('x-portal-column-first');
            items[len - 1].addCls('x-portal-column-last');
            return this.callParent(arguments);
        },    // private
        initEvents : function(){
            this.callParent();
            this.dd = Ext.create('Ext.app.PortalDropZone', this, this.dropConfig);
        },    // private
        beforeDestroy : function() {
            if (this.dd) {
                this.dd.unreg();
            }
            Ext.app.PortalPanel.superclass.beforeDestroy.call(this);
        }
    });
      

  4.   

    好像是继承的 Ext.container.Viewport 可是还是不一样呢。我研究研究Viewport 吧。