ExtJs文件字段在第一次使用后消失



我正在尝试使用ExtJs文件字段控件上传文件。

我这样使用它:

 xtype: 'container',
        margin: '15 0 0 25',
        layout: 'vbox',
        defaults: {
            width: 400
        },
        items: [{
            xtype: 'filefield',
            itemId: 'fileChooser',
            fieldLabel: 'CSV file',
            labelWidth: 50,
            buttonText: 'Select CSV file...'
       }]

但是,在我用它来选择一个文件(我设法正确地做)之后,fieldfile消失了!

有人有同样的问题吗?

请按这种方式试试

                            {
                              xtype: 'form',
                              type: 'fileUploadForm',
                              items: [{
                                xtype: 'filefield',
                                cls:'upload-btn',
                                height:40,
                                type:'uploadButton',
                                name: 'file',
                                buttonText:'Upload New Version',
                            listeners: {
                                scope: this,
                                change: this.handleIconChange
                            }
                        }]
                        }

最新更新