Ext.form.field.Text.override({
initComponent:function () {
if (this.fieldLabel && this.fieldLabel.indexOf("*") === -1 && (this.allowBlank === false ||this.validateBlank ===true)) {
this.fieldLabel += '<font color=red>*</font>';
}
this.callParent(arguments);
}
});
Ext.form.field.ComboBox.override({
initComponent:function () {
if (this.fieldLabel && this.fieldLabel.indexOf("*") === -1 && (this.allowBlank === false ||this.validateBlank ===true)) {
this.fieldLabel += '<font color=red>*</font>';
}
this.callParent(arguments);
}
});
Ext.form.field.Date.override({
initComponent:function () {
if (this.fieldLabel && this.fieldLabel.indexOf("*") === -1 && (this.allowBlank === false ||this.validateBlank ===true)) {
this.fieldLabel += '<font color=red>*</font>';
}
this.callParent(arguments);
}
});
转载于:https://my.oschina.net/u/3702584/blog/1547067