Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
升级后的ExtJS 4.1布局问题_Extjs_Extjs4.1 - Fatal编程技术网

升级后的ExtJS 4.1布局问题

升级后的ExtJS 4.1布局问题,extjs,extjs4.1,Extjs,Extjs4.1,从extjs4.0.7升级到4.1后,我面临一个布局问题。面板中有五个字段(四个组合和一个日期选择器)。这是面板配置的相关部分: defaults: { flex: 1, margin: '4', labelAlign: 'top' }, layout: { type: 'hbox', align: 'top' }, 在ExtJS 4.0.7中,所有五个字段都以相同的宽度和预期的边距显示。在ExtJS4.1中,布局计算似乎没有考虑文本字段右侧图标的宽度

从extjs4.0.7升级到4.1后,我面临一个布局问题。面板中有五个字段(四个组合和一个日期选择器)。这是面板配置的相关部分:

defaults: {
    flex: 1,
    margin: '4',
    labelAlign: 'top'
},
layout: {
    type: 'hbox',
    align: 'top'
},
在ExtJS 4.0.7中,所有五个字段都以相同的宽度和预期的边距显示。在ExtJS4.1中,布局计算似乎没有考虑文本字段右侧图标的宽度


有什么想法吗?

嗯,可能还有其他原因导致了这个问题。事实上,这对我很有好处:

Ext.create ('Ext.container.Container', {
    renderTo: Ext.getBody () ,
    layout: {
        type: 'hbox' ,
        align: 'top'
    } ,
    defaults: {
        flex: 1 ,
        labelAlign: 'top' ,
        margin: 4
    } ,
    items: [{
        xtype: 'combo'
    } , {
        xtype: 'combo'
    } , {
        xtype: 'combo'
    } , {
        xtype: 'combo'
    } , {
        xtype: 'datefield'
    }]
});

它与“margin:4”和“margin:4”一起使用。

嗯,可能还有其他原因导致这个问题。事实上,这对我很有好处:

Ext.create ('Ext.container.Container', {
    renderTo: Ext.getBody () ,
    layout: {
        type: 'hbox' ,
        align: 'top'
    } ,
    defaults: {
        flex: 1 ,
        labelAlign: 'top' ,
        margin: 4
    } ,
    items: [{
        xtype: 'combo'
    } , {
        xtype: 'combo'
    } , {
        xtype: 'combo'
    } , {
        xtype: 'combo'
    } , {
        xtype: 'datefield'
    }]
});

它与“margin:4”和“margin:4”一起使用。

谢谢,你说得对,在空白页中,这很好。我认为我禁用了所有干扰样式或脚本,显然这是不正确的。在使用范围样式表时,问题似乎存在。除非我遗漏了什么,否则在4.1中不再需要这个
varext={buildSettings:{scopeResetCSS:true}当使用ext-all-scoped.css时。谢谢,你说得对,在空白页面中这很好。我认为我禁用了所有干扰样式或脚本,显然这是不正确的。在使用范围样式表时,问题似乎存在。除非我遗漏了什么,否则在4.1中不再需要这个
varext={buildSettings:{scopeResetCSS:true}使用ext-all-scoped.css时。