Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css ExtJS:displayfield与textfield具有相同的样式_Css_Extjs - Fatal编程技术网

Css ExtJS:displayfield与textfield具有相同的样式

Css ExtJS:displayfield与textfield具有相同的样式,css,extjs,Css,Extjs,我使用xtypedisplayfield作为链接,并displayfield呈现html ok。它很好用。我想对displayfield使用与textfield相同的样式(特别是因为边框) 你能告诉我最简单的方法吗?我尝试了使用各种前缀的fieldCls、baseCls等,但没有找到有效的解决方案 这是我的最后一次测试,你能告诉我有什么问题吗 Ext.create('Ext.form.Panel', { bodyPadding: 10, defaultType: 'textfie

我使用xtypedisplayfield作为链接,并displayfield呈现html ok。它很好用。我想对displayfield使用与textfield相同的样式(特别是因为边框)

你能告诉我最简单的方法吗?我尝试了使用各种前缀的fieldClsbaseCls等,但没有找到有效的解决方案

这是我的最后一次测试,你能告诉我有什么问题吗

Ext.create('Ext.form.Panel', {
    bodyPadding: 10,
    defaultType: 'textfield',
    fieldDefaults: {
        labelAlign: 'right',
        labelWidth: 150
    },
    renderTo: Ext.getBody(),
    standardSubmit: true,
    title: 'Form',
    width: 400,
    items: [
    {
        fieldCls: 'x-form-text',
        fieldLabel: 'Displayfield with link',
        name: 'field01',
        value: 'Some text <a href=http://www.yoururl.com>www.yoururl.com</a>',
        xtype: 'displayfield'
    },{
        fieldLabel: 'Textfield',
        name: 'field02',
        value: 'default',
        xtype: 'textfield' 
    }]
});
Ext.create('Ext.form.Panel'{
车身衬垫:10,
defaultType:'textfield',
字段默认值:{
labelAlign:'对',
标签宽度:150
},
renderTo:Ext.getBody(),
标准提交:对,
标题:“表格”,
宽度:400,
项目:[
{
fieldCls:'x-form-text',
fieldLabel:'Displayfield with link',
名称:'field01',
值:“某些文本”,
xtype:'displayfield'
},{
fieldLabel:“Textfield”,
名称:'field02',
值:“默认值”,
xtype:'textfield'
}]
});
Ext.create('Ext.form.Panel'{
车身衬垫:10,
defaultType:'textfield',
字段默认值:{
labelAlign:'对',
标签宽度:150
},        
renderTo:Ext.getBody(),
标准提交:对,
标题:“表格”,
宽度:400,
项目:[
{
fieldBodyCls:'x-form-trigger-wrap-default x-form-text x-form-text-default',
fieldLabel:'Displayfield with link',
名称:'field01',
值:“某些文本”,
xtype:'displayfield'
},{
fieldLabel:“Textfield”,
名称:'field02',
值:“默认值”,
xtype:'textfield'
}]
});

非常感谢,类提供了预期的输出,我将它与config fieldCls一起使用,作为fieldBodyCls更适合我
Ext.create('Ext.form.Panel', {
    bodyPadding: 10,
    defaultType: 'textfield',
    fieldDefaults: {
        labelAlign: 'right',
        labelWidth: 150
    },        
    renderTo: Ext.getBody(),
    standardSubmit: true,
    title: 'Form',
    width: 400,
    items: [
    {
        fieldBodyCls: 'x-form-trigger-wrap-default x-form-text x-form-text-default',
        fieldLabel: 'Displayfield with link',
        name: 'field01',
        value: 'Some text <a href=http://www.yoururl.com>www.yoururl.com</a>',
        xtype: 'displayfield'
    },{
        fieldLabel: 'Textfield',
        name: 'field02',
        value: 'default',
        xtype: 'textfield' 
    }]
});