ExtJS,调用其他视图时 Ext.window.Window 出现问题

问题描述 投票:0回答:0

我已经定义了一个带有边框布局的宽度和高度的窗口类。它在显示时工作正常,但是当我将此窗口类调用到其他视图时,它采用自己的大小,并且当使用布局类型时,窗口根本不会显示。 我是 ExtJS 的新手,还在摸索

` 这是我的窗口类 Ext.define('Task.view.a.a',{

    extend:'Ext.window.Window',
    title:'A- WINDOW',
    resizable:false,
    //autoShow:true,
    maxWidth:400,
    maxHeight:300,
    // layout:{
    //     type:'border'
    // },
    items:[{
        margin:'20 0 0 0',
        xtype:'panel',
        layout:'fit',
        title:'Panel in the Window',
        html:'Panel inside the window'
    }]
})`

` 这是我在“Task.view.main.Main”中的处理函数 处理程序:函数(btn){ var form = this.up('form').getForm();

                if(form.isValid()){
                    //Ext.Msg.alert('Submitting!?','OKAY')
                    console.log(form.getValues())

                    Ext.defer(function(){
                        Ext.create('Task.view.a.a').show();
                    },2000)
                    
                }
                else{
                    Ext.Msg.alert('\'ERROR!?\' ','Please fill all the required fields')
                }
            }`
extjs window
© www.soinside.com 2019 - 2024. All rights reserved.