|
@@ -255,8 +255,22 @@ export const formSchema: FormSchema[] = [
|
|
|
component: 'Input',
|
|
|
labelWidth: 200,
|
|
|
required: true,
|
|
|
- componentProps: {
|
|
|
- AutoComplete: 'off',
|
|
|
+ componentProps: ({ formModel }) => {
|
|
|
+ return {
|
|
|
+ AutoComplete: 'off',
|
|
|
+ onblur: ({ currentTarget }) => {
|
|
|
+ const stringLog = currentTarget.value;
|
|
|
+ let newString = '';
|
|
|
+ for (let i = 0; i < stringLog.length; i++) {
|
|
|
+ if (/^[A-Za-z]$/.test(stringLog[i]) && /^[a-z]$/.test(stringLog[i])) {
|
|
|
+ newString = newString + stringLog[i].toUpperCase();
|
|
|
+ } else {
|
|
|
+ newString = newString + stringLog[i];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ formModel.name = newString;
|
|
|
+ },
|
|
|
+ };
|
|
|
},
|
|
|
},
|
|
|
{
|
|
@@ -265,8 +279,22 @@ export const formSchema: FormSchema[] = [
|
|
|
colProps: { span: 12 },
|
|
|
labelWidth: 200,
|
|
|
component: 'Input',
|
|
|
- componentProps: {
|
|
|
- AutoComplete: 'off',
|
|
|
+ componentProps: ({ formModel }) => {
|
|
|
+ return {
|
|
|
+ AutoComplete: 'off',
|
|
|
+ onblur: ({ currentTarget }) => {
|
|
|
+ const stringLog = currentTarget.value;
|
|
|
+ let newString = '';
|
|
|
+ for (let i = 0; i < stringLog.length; i++) {
|
|
|
+ if (/^[A-Za-z]$/.test(stringLog[i]) && /^[a-z]$/.test(stringLog[i])) {
|
|
|
+ newString = newString + stringLog[i].toUpperCase();
|
|
|
+ } else {
|
|
|
+ newString = newString + stringLog[i];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ formModel.abbreviation = newString;
|
|
|
+ },
|
|
|
+ };
|
|
|
},
|
|
|
},
|
|
|
{
|