Javascript 在IE中,从Ext.form.FieldSet中删除项会导致字段集展开
我有一个ExtJS项目,其中有一个字段集,我需要从中动态删除项并替换为不同的项 但是,当我删除项然后添加新项时,字段集每次都会略微扩展,因此整个字段集会不断增长 这只发生在IE中,而不是Firefox或Chrome 这是我的字段集Javascript 在IE中,从Ext.form.FieldSet中删除项会导致字段集展开,javascript,html,internet-explorer,extjs,Javascript,Html,Internet Explorer,Extjs,我有一个ExtJS项目,其中有一个字段集,我需要从中动态删除项并替换为不同的项 但是,当我删除项然后添加新项时,字段集每次都会略微扩展,因此整个字段集会不断增长 这只发生在IE中,而不是Firefox或Chrome 这是我的字段集 var lonFields = new Ext.form.FieldSet({ ref: '../../setLonFieldSet', layout: { type: 'table',
var lonFields = new Ext.form.FieldSet({
ref: '../../setLonFieldSet',
layout: {
type: 'table',
columns: 2
}
});
这里是我引用它的地方,删除所有内容,然后添加新内容
Ext.getCmp('maintainGeneratorsBatteriesViewport').setLonFieldSet.removeAll();
Ext.getCmp('maintainGeneratorsBatteriesViewport').setLonFieldSet.add(
{html: "<b>Default Lon:</b>"}
);
Ext.getCmp('maintainGeneratorsBatteriesViewport').setLonFieldSet.add(
{html: "<b>Default Lon:</b>"}
);
Ext.getCmp('MaintaintGeneratorsBatteriesViewport').setLonFieldSet.removeAll();
Ext.getCmp('MaintaintGeneratorsBatteriesViewport')。setLonFieldSet.add(
{html:“默认Lon:”}
);
Ext.getCmp('MaintaintGeneratorsBatteriesViewport')。setLonFieldSet.add(
{html:“默认Lon:”}
);
正如我所说,在IE中,这会导致整个字段集每次都增加高度
有什么建议吗
提前感谢,,
蒂姆试试这个:
var fieldSet=Ext.getCmp(“您的字段集id”);
fieldSet.removeAll(fieldSet.items);
fieldSet.doLayout()这绝对是一个bug,你应该在sencha论坛上报告。请提供它发生的ie版本。Yepper。这显然是一个错误。无论你做得多么简单,它总是增加额外的像素线。现在要做的唯一一件事是,如果要删除行,然后添加行,就不要使用表布局。如果使用其他类型的布局,则效果良好。