【问题标题】:Extjs6 Filefield inside fieldset working fine with Chrome and not working in FF字段集中的 Extjs6 文件字段在 Chrome 中工作正常,但在 FF 中不工作
【发布时间】:2016-02-23 00:29:40
【问题描述】:

(sencha fiddle for filefield inside fieldset)

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

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

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

【问题讨论】:

    标签: extjs6 extjs6-modern


    【解决方案1】:

    Mohan,它确实看起来像一个错误。 我注意到,如果您一开始没有崩溃,那么它可以正常工作。因此,作为一种解决方法,您可以将配置更改为开始时不折叠,然后在 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();}
    
                }
            }]
        });
        }
    });
    

    【讨论】:

      猜你喜欢
      • 2012-03-18
      • 1970-01-01
      • 2016-07-13
      • 1970-01-01
      • 1970-01-01
      • 2014-10-04
      • 1970-01-01
      • 2018-04-12
      • 1970-01-01
      相关资源
      最近更新 更多