|
@@ -2,27 +2,29 @@
|
|
<div class="login-container">
|
|
<div class="login-container">
|
|
<el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px"
|
|
<el-form autoComplete="on" :model="loginForm" :rules="loginRules" ref="loginForm" label-position="left" label-width="0px"
|
|
class="card-box login-form">
|
|
class="card-box login-form">
|
|
- <h3 class="title">系统登录</h3>
|
|
|
|
- <el-form-item prop="username">
|
|
|
|
|
|
+ <h3 class="title">vue-element-admin</h3>
|
|
|
|
+ <el-form-item prop="username">
|
|
<span class="svg-container svg-container_login">
|
|
<span class="svg-container svg-container_login">
|
|
<icon-svg icon-class="yonghuming" />
|
|
<icon-svg icon-class="yonghuming" />
|
|
</span>
|
|
</span>
|
|
- <el-input name="username" type="text" v-model="loginForm.username" autoComplete="on" placeholder="邮箱" />
|
|
|
|
|
|
+ <el-input name="username" type="text" v-model="loginForm.username" autoComplete="on" placeholder="username" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item prop="password">
|
|
<el-form-item prop="password">
|
|
<span class="svg-container">
|
|
<span class="svg-container">
|
|
- <icon-svg icon-class="mima" ></icon-svg>
|
|
|
|
|
|
+ <icon-svg icon-class="mima"></icon-svg>
|
|
</span>
|
|
</span>
|
|
<el-input name="password" type="password" @keyup.enter.native="handleLogin" v-model="loginForm.password" autoComplete="on"
|
|
<el-input name="password" type="password" @keyup.enter.native="handleLogin" v-model="loginForm.password" autoComplete="on"
|
|
- placeholder="密码"></el-input>
|
|
|
|
|
|
+ placeholder="password"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
|
|
<el-button type="primary" style="width:100%;" :loading="loading" @click.native.prevent="handleLogin">
|
|
- 登录
|
|
|
|
|
|
+ Sign in
|
|
</el-button>
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <div class='tips'>账号:admin 密码随便填</div>
|
|
|
|
- <div class='tips'>账号:editor 密码随便填</div>
|
|
|
|
|
|
+ <div class='tips'>
|
|
|
|
+ <span style="margin-right:20px;">username: admin</span>
|
|
|
|
+ </span> password: admin</span>
|
|
|
|
+ </div>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -41,8 +43,8 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const validatePass = (rule, value, callback) => {
|
|
const validatePass = (rule, value, callback) => {
|
|
- if (value.length < 6) {
|
|
|
|
- callback(new Error('密码不能小于6位'))
|
|
|
|
|
|
+ if (value.length < 5) {
|
|
|
|
+ callback(new Error('密码不能小于5位'))
|
|
} else {
|
|
} else {
|
|
callback()
|
|
callback()
|
|
}
|
|
}
|
|
@@ -50,7 +52,7 @@ export default {
|
|
return {
|
|
return {
|
|
loginForm: {
|
|
loginForm: {
|
|
username: 'admin',
|
|
username: 'admin',
|
|
- password: '111111'
|
|
|
|
|
|
+ password: 'admin'
|
|
},
|
|
},
|
|
loginRules: {
|
|
loginRules: {
|
|
username: [{ required: true, trigger: 'blur', validator: validateUsername }],
|
|
username: [{ required: true, trigger: 'blur', validator: validateUsername }],
|