|
@@ -0,0 +1,16 @@
|
|
|
+export default function () {
|
|
|
+ /**
|
|
|
+ * 改变必填项之前加星号
|
|
|
+ */
|
|
|
+ const t1 = Ext.form.field.Text.prototype.initComponent
|
|
|
+ Ext.form.field.Text.override({
|
|
|
+ initComponent: function () {
|
|
|
+ if (this.allowBlank === false || this.validateBlank === true) {
|
|
|
+ this.beforeLabelTextTpl = [
|
|
|
+ '<span style="color:red;font-weight:bold" data-qtip="必填选项">*</span>'
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ t1.call(this)
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|