0

我正在尝试在 ExtJS 中使用 Hbox 和 Vbox 开发一个简单的布局。但是在两个框中(参见快照中的关系和缩写框)没有随机显示边框。我找不到任何理由。如果可能的话,请帮助我。我在这里给出我的屏幕截图和代码快照。

截屏

在此处输入图像描述

代码

Ext.define('EzRE.view.Viewport', {
extend : 'Ext.container.Viewport',
requires : ['EzRE.view.DashBoard'],
getOneSectionLayout:function(title,isFirst){
    var margin = null;
    if(isFirst)
    {
        margin = "10px 10px 10px 10px";
    }
    else
    {
        margin = "10px 10px 10px 0px";
    }
    return{
        xtype:'panel',
        height:'100%',
        flex:1,
        style:{
            "margin":margin
        },
        title:title
    };
},
getMainLayout:function(title,items){
    return{
        xtype:'panel',
        flex:1,
        width:'100%',
        title:title,
        border:false,
        layout:{
            type:'hbox',
            align:'middle',
            pack:'center'
        },
        items:items
    };
},
initComponent:function(){

        this.layout={
                type:'vbox'
        };

        var NLP_SEC_ITEMS = [this.getOneSectionLayout('Section Header',true),
                           this.getOneSectionLayout('Abbrivation',false),
                           this.getOneSectionLayout('Nagation',false),
                           this.getOneSectionLayout('Head Rule',false),
                           this.getOneSectionLayout('Relationship',false),
                           this.getOneSectionLayout('Overlap',false)];

        var KNOWLEDGE_SEC_ITEMS = [this.getOneSectionLayout('Precision Analysis',true),
                           this.getOneSectionLayout('Recall Analysis W/O Annotation',false),
                           this.getOneSectionLayout('Recall Analysis With Annotation',false)];

        var CODE_SEC_ITEMS = [this.getOneSectionLayout('Code Rule Engine',true),
                           this.getOneSectionLayout('Code DRG Analysis',false),
                           this.getOneSectionLayout('Code Associan Analysis',false)];

        this.items = [this.getMainLayout('NLP', NLP_SEC_ITEMS),
                      this.getMainLayout('Knowledge', KNOWLEDGE_SEC_ITEMS),
                      this.getMainLayout('Code', CODE_SEC_ITEMS)];

        this.callParent(arguments);
}

});

4

0 回答 0