Sencha touch 具有sencha触控功能的图像场

Sencha touch 具有sencha触控功能的图像场,sencha-touch,extjs4,extjs,Sencha Touch,Extjs4,Extjs,我正在使用sencha touch制作form.fieldset。在我的模型中,我有一个图像字段,如何显示模型的当前图像?我的form.fieldset看起来像: /** * This is used by the NestedList example to allow editing of an item in the Store */ Ext.define('ParkingSencha.view.EditorPanel', { extend: 'Ext.form.Panel',

我正在使用sencha touch制作form.fieldset。在我的模型中,我有一个图像字段,如何显示模型的当前图像?我的form.fieldset看起来像:

/**
 * This is used by the NestedList example to allow editing of an item in the Store
 */
Ext.define('ParkingSencha.view.EditorPanel', {
    extend: 'Ext.form.Panel',
    requires: ['Ext.form.FieldSet'],
    id: 'editorPanel',
    config: {
        modal: true,
        hideOnMaskTap: false,
        centered: true,
        width: 500,
        scrollable: false,
        items: [{
            xtype: 'fieldset',
            items: [
            {
                xtype: 'textfield',
                name: 'keyword',
                label: 'Mots clés'
            },
            {
                xtype: 'textfield',
                name: 'title',
                label: 'Titre'
            },
            {
                xtype: 'textfield',
                name: 'image',
                label: 'image'
            }
            ]
          }]
        }]
    }
});
要在
表单字段
中使用/加载
图像
,需要使用
图像
组件,而不是
文本字段

这样做,

....
{
  xtype: 'image',
  src: 'http://www.sencha.com/assets/images/sencha-avatar-64x64.png',
  flex: 1
},
....

还有另一种解决方案,即在html标记中添加标签并设置图像……) 像这样

{
xtype:'label',
html:'<img src="path of image ">'
}
{
xtype:“标签”,
html:'
}

或者boomslang ans非常正确,我建议您使用它。

您想将图像加载到第三个文本字段区域吗?是的,我想将其加载到第三个文本字段。我的图像存储在我的服务器上。图像是否在文本字段中?这有什么意义呢?当你编辑一个带有图像的模型时。是否要显示当前图像?这就是我想做的。我写textfield只是因为我不知道该用什么。图像组件用于ST中的图像,而不是textfield。我知道,你们有什么解决方案吗?