提取公共字段
Showing
3 changed files
with
10 additions
and
2 deletions
| ... | @@ -10,6 +10,7 @@ | ... | @@ -10,6 +10,7 @@ |
| 10 | class="login-input" | 10 | class="login-input" |
| 11 | placeholder="请输入工号" | 11 | placeholder="请输入工号" |
| 12 | v-model.trim="loginForm.username" | 12 | v-model.trim="loginForm.username" |
| 13 | :maxlength="inputMaxLength" | ||
| 13 | ) | 14 | ) |
| 14 | i(slot="prefix" class="icon username-icon") | 15 | i(slot="prefix" class="icon username-icon") |
| 15 | el-form-item(prop="password") | 16 | el-form-item(prop="password") |
| ... | @@ -19,6 +20,7 @@ | ... | @@ -19,6 +20,7 @@ |
| 19 | size="medium" | 20 | size="medium" |
| 20 | placeholder="请输入密码" | 21 | placeholder="请输入密码" |
| 21 | class="login-input" | 22 | class="login-input" |
| 23 | :maxlength="inputMaxLength" | ||
| 22 | v-model.trim="loginForm.password" | 24 | v-model.trim="loginForm.password" |
| 23 | ) | 25 | ) |
| 24 | i(slot="prefix" class="icon password-icon") | 26 | i(slot="prefix" class="icon password-icon") |
| ... | @@ -41,6 +43,7 @@ | ... | @@ -41,6 +43,7 @@ |
| 41 | <script> | 43 | <script> |
| 42 | import Captcha from 'captcha-mini' | 44 | import Captcha from 'captcha-mini' |
| 43 | import { maxSizeValidate } from '@/views/validate' | 45 | import { maxSizeValidate } from '@/views/validate' |
| 46 | import { inputMaxLength } from '@/utils/mappingData' | ||
| 44 | 47 | ||
| 45 | export default { | 48 | export default { |
| 46 | name: 'LoginForm', | 49 | name: 'LoginForm', |
| ... | @@ -70,6 +73,7 @@ export default { | ... | @@ -70,6 +73,7 @@ export default { |
| 70 | }, | 73 | }, |
| 71 | data() { | 74 | data() { |
| 72 | return { | 75 | return { |
| 76 | inputMaxLength, | ||
| 73 | verCode: '', | 77 | verCode: '', |
| 74 | captcha1: null, | 78 | captcha1: null, |
| 75 | loginForm: { | 79 | loginForm: { | ... | ... |
| ... | @@ -12,7 +12,7 @@ | ... | @@ -12,7 +12,7 @@ |
| 12 | <el-input | 12 | <el-input |
| 13 | v-model.trim="ruleForm.username" | 13 | v-model.trim="ruleForm.username" |
| 14 | placeholder="请输入营销员姓名" | 14 | placeholder="请输入营销员姓名" |
| 15 | maxlength="21" | 15 | :maxlength="inputMaxLength" |
| 16 | > | 16 | > |
| 17 | <i slot="prefix" class="el-icon-search"></i | 17 | <i slot="prefix" class="el-icon-search"></i |
| 18 | ></el-input> | 18 | ></el-input> |
| ... | @@ -21,7 +21,7 @@ | ... | @@ -21,7 +21,7 @@ |
| 21 | <el-input | 21 | <el-input |
| 22 | v-model.trim="ruleForm.userId" | 22 | v-model.trim="ruleForm.userId" |
| 23 | placeholder="请输入营销员工号" | 23 | placeholder="请输入营销员工号" |
| 24 | maxlength="21" | 24 | :maxlength="inputMaxLength" |
| 25 | > | 25 | > |
| 26 | <i slot="prefix" class="el-icon-search"></i | 26 | <i slot="prefix" class="el-icon-search"></i |
| 27 | ></el-input> | 27 | ></el-input> |
| ... | @@ -107,6 +107,7 @@ | ... | @@ -107,6 +107,7 @@ |
| 107 | import FooterPaginationfrom from './components/FooterPagination' | 107 | import FooterPaginationfrom from './components/FooterPagination' |
| 108 | import { parseTime, parseTimeSecond } from '@/utils/util' | 108 | import { parseTime, parseTimeSecond } from '@/utils/util' |
| 109 | import { getResourceMonitorList } from '@/api/monitor' | 109 | import { getResourceMonitorList } from '@/api/monitor' |
| 110 | import { inputMaxLength } from '@/utils/mappingData' | ||
| 110 | 111 | ||
| 111 | export default { | 112 | export default { |
| 112 | components: { | 113 | components: { |
| ... | @@ -114,6 +115,7 @@ export default { | ... | @@ -114,6 +115,7 @@ export default { |
| 114 | }, | 115 | }, |
| 115 | data() { | 116 | data() { |
| 116 | return { | 117 | return { |
| 118 | inputMaxLength, | ||
| 117 | parseTime, | 119 | parseTime, |
| 118 | parseTimeSecond, | 120 | parseTimeSecond, |
| 119 | ruleForm: { | 121 | ruleForm: { | ... | ... |
-
Please register or sign in to post a comment