1

字段集中的文件字段的sencha小提琴

我在 extjs6 的字段集中有一个文件字段。字段集最初是折叠的,我只将文件字段设置为按钮。如果我在显示的 chrome 按钮中打开字段集,但在 Firefox 中看不到该按钮。

如果我在附加的小提琴中注释掉第 19 行或在启动时打开字段集,则 filefield 在 Firefox 和 chrome 中看起来都不错。

请参考随附的煎茶小提琴并告诉您出了什么问题。

4

1 回答 1

1

莫汉,它看起来确实像个虫子。我注意到,如果您一开始没有崩溃,那么它可以正常工作。因此,作为一种解决方法,您可以将配置更改为开始时不折叠,然后在 afterrender 中折叠它:

Ext.application({
    name : 'Fiddle',

    launch : function() {
        Ext.create('Ext.form.Panel', {
        title: 'Fieldsets with Files',
        //labelWidth: 75, 
        frame: true,
        bodyStyle: 'padding:5px 5px 0',
        width: 550,
        renderTo: Ext.getBody(),
        //layout: 'column', // arrange fieldsets side by side
        items: [{
            xtype : 'fieldset',
            name : 'docAttachment',
            border: 2,
            title : '<b>Attach your document</b>',
            collapsible : true,
            //collapsed : true,
            //layout : {
               // type : 'hbox',
               // align : 'center',
               // pack : 'center'
            //},
            items :[{
                xtype: 'fileuploadfield',
                name: 'fileuploads',
                buttonOnly: true,
                buttonText : 'Select a File...'
            }],
            listeners:{
                'afterrender':function(){this.collapse();}

            }
        }]
    });
    }
});
于 2016-02-23T03:31:27.080 回答