守着一只汪
恕我直言,不可能使用“Ext.form.field.Text”来显示彩色文本。但是您可以使用显示字段(只读)或 html 编辑器..new Ext.panel.Panel({ title: 'Form', renderTo: Ext.getBody(), width: 550, height: 250, frame: true, layout: 'form', items: [{ xtype: 'htmleditor', fieldLabel: "HTML Editor", enableColors: false, enableAlignments: false, value: "Random (<span style='color:red;'>1234</span>)", }, { xtype: 'displayfield', fieldLabel: "Display Field", value: "Random (<span style='color:red;'>1234</span>)", }] });