为什么Ext.panel.Panel不回复?

时间:2018-12-06 11:40:15

标签: javascript extjs web-applications extjs4 sencha-touch

应用程序具有按钮,该按钮将调用登录表单。此表单具有一个按钮,该按钮调用Ext.panel.Panel类。我以不同的方式(针对不同的元素)设置了renderTo config,但是当我对其进行测试时,尚未创建面板。调试器显示函数正常工作(调试器在这部分代码中停止) 怎么了?

具有Ext.create('Ext.panel.Panel'的表单:

Ext.define('Foresto.view.forms.LoginRoom', {
extend: 'Ext.form.Panel',
title: 'Enter',
width: 700,
height: 245,
id:'logspace',
fullscreen: true,
layout:'vbox',
header: {
    cls: 'header-cls'

},
scrollable: true,

xtype: 'LoRoom',


tools: [{
    type:'minimize',
    callback: function(){}
},{
    type:'close',
    callback: function(){}
}],

items: [
        {
            //SCROLL DOWN FOR HANDLER
            xtype: 'textfield',
            margin: 6,
            name: 'name',
            label: 'Name',
            labelCls: 'fielddesign',
            value: 'user',
            autoCapitalize: false
        },{
            xtype: 'passwordfield',
            margin: 6,
            name: 'password',
            label: 'Password',
            labelCls: 'textFieldDesign',
            value: 'test'
        },{
            xtype: 'button',
            text:'Enter',
            ui: 'confirm',
            margin: 4



        },{
            xtype: 'button',
            text:'SU',
            margin: 4,
            handler: function(){
                Ext.create('Ext.panel.Panel',{

                    fullscreen:true,

                    title: 'WorkSpace',
                    renderTo: 'logspace'

                });

        }
        }
    ]

})

Main.js:

//some Main code
getMenuCfg: function(side) {
    return {
        items: [{
            text: 'Looking',
            iconCls: 'x-fa fa-pencil',
            ui:'confirm',
            scope: this,
            handler: function() {
                if (!this.overlay) {
                    this.overlay = Ext.Viewport.add({
                        xtype: 'LoRoom',
                        fullscreen: true,
                        modal: true,
                        hideOnMaskTap: true,
                        showAnimation: {
                            type: 'popIn',
                            duration: 250,
                            easing: 'ease-out'
                        },
                        hideAnimation: {
                            type: 'popOut',
                            duration: 250,
                            easing: 'ease-out'
                        },
                        centered: true,
                        width: Ext.filterPlatform('ie10') ? '100%' : (Ext.os.deviceType == 'Phone') ? 260 : 400,
                        maxHeight: Ext.filterPlatform('ie10') ? '30%' : (Ext.os.deviceType == 'Phone') ? 220 : 400,
                        scrollable: true

                    });
                }

                this.overlay.show();
            }
        }]
    };
}

0 个答案:

没有答案