【问题标题】:Unable to load Image in ExtJS 4 form panel无法在 ExtJS 4 表单面板中加载图像
【发布时间】:2014-05-13 14:10:52
【问题描述】:

我有一个表单面板..我试图在其中添加图像...图像块出现但图像未加载..调整图像块的大小工作正常..这是我的代码从 html 文件调用.. 有人可以帮我解决这个问题吗?

 Ext.application({
    name : 'hello',
    launch : function() {
        Ext.create('Ext.form.Panel', {
            title : 'Create Catalog',
            defaultType : 'textfield',
            items : [ {
                fieldLabel : 'Name',
                name : 'name',
                anchor : '100%',
                allowBlank : false
            },{
                xtype : 'imagefield',
                fieldLabel : 'Image Here',
                src : 'i1.jpg',
                width : 50,
                height : 25
            }
            ],
                renderTo : Ext.getBody()
        });
    }
});

【问题讨论】:

    标签: extjs extjs4


    【解决方案1】:

    现在可以使用了……xtype 应该是图像。

    {
    xtype: 'image',
    fieldLabel: 'Image Here',
    src: 'i2.png',
    width: 50,
        height: 50
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-11-22
      • 2023-04-03
      • 1970-01-01
      • 2011-08-24
      • 2013-01-09
      • 2011-10-23
      • 1970-01-01
      相关资源
      最近更新 更多