修改输入框字段限制

This commit is contained in:
GGJ
2024-12-13 14:36:23 +08:00
parent a856075ddb
commit 8c4cc891e5
58 changed files with 663 additions and 1211 deletions

View File

@@ -12,16 +12,16 @@
</div>
<el-form :rules="rules" ref="formRef" size="large" class="login-form" :model="form">
<el-form-item prop="username">
<el-input ref="usernameRef" v-model="form.username" type="text" clearable style="width: 368px"
placeholder="用户名" autocomplete="off">
<el-input maxlength="32" show-word-limit ref="usernameRef" v-model="form.username" type="text"
clearable style="width: 368px" placeholder="用户名" autocomplete="off">
<template #prefix>
<span class="iconfont icon-yonghu" style="color: #003078"></span>
</template>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input ref="passwordRef" v-model="form.password" type="password" placeholder="密码" show-password
style="width: 368px" autocomplete="off">
<el-input maxlength="32" show-word-limit ref="passwordRef" v-model="form.password" type="password"
placeholder="密码" show-password style="width: 368px" autocomplete="off">
<template #prefix>
<span class="iconfont icon-mima" style="color: #003078"></span>
</template>

View File

@@ -13,42 +13,26 @@
<div class='content'>
<el-form @keyup.enter='onSubmit()' ref='formRef' size='large' :model='form'>
<el-form-item prop='username'>
<el-input
ref='usernameRef'
type='text'
clearable
v-model='form.username'
placeholder='请输入账号'
>
<el-input maxlength="32" show-word-limit ref='usernameRef' type='text' clearable
v-model='form.username' placeholder='请输入账号'>
<template #prefix>
<Icon name='fa fa-user' class='form-item-icon' size='16'
color='var(--el-input-icon-color)' />
color='var(--el-input-icon-color)' />
</template>
</el-input>
</el-form-item>
<el-form-item prop='password'>
<el-input
ref='passwordRef'
v-model='form.password'
type='password'
placeholder='请输入密码'
show-password
>
<el-input maxlength="32" show-word-limit ref='passwordRef' v-model='form.password'
type='password' placeholder='请输入密码' show-password>
<template #prefix>
<Icon name='fa fa-unlock-alt' class='form-item-icon' size='16'
color='var(--el-input-icon-color)' />
color='var(--el-input-icon-color)' />
</template>
</el-input>
</el-form-item>
<el-form-item>
<el-button
:loading='state.submitLoading'
class='submit-button'
round
type='primary'
size='large'
@click='onSubmit()'
>
<el-button :loading='state.submitLoading' class='submit-button' round type='primary'
size='large' @click='onSubmit()'>
登录
</el-button>
</el-form-item>

View File

@@ -3,10 +3,12 @@
<el-scrollbar>
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
<el-form-item label="新密码:" prop="newPwd" style="margin-top: 20px">
<el-input v-model="form.newPwd" type="password" placeholder="请输入新密码" show-password />
<el-input maxlength="32" show-word-limit v-model="form.newPwd" type="password" placeholder="请输入新密码"
show-password />
</el-form-item>
<el-form-item label="确认密码:" prop="confirmPwd" style="margin-top: 20px">
<el-input v-model="form.confirmPwd" type="password" placeholder="请输入确认密码" show-password />
<el-input maxlength="32" show-word-limit v-model="form.confirmPwd" type="password"
placeholder="请输入确认密码" show-password />
</el-form-item>
</el-form>
</el-scrollbar>