style:优化ui
This commit is contained in:
+20
-20
@@ -6,35 +6,23 @@
|
||||
|
||||
<LangSelect title="多语言设置" class="langSet" />
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" type="text" size="default" auto-complete="off" :placeholder="$t('login.account')">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" :placeholder="$t('login.account')">
|
||||
<template #prefix>
|
||||
<svg-icon name="user" class="el-input__icon input-icon" />
|
||||
<svg-icon name="user" class="input-icon" />
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
type="password"
|
||||
size="default"
|
||||
auto-complete="off"
|
||||
:placeholder="$t('login.password')"
|
||||
@keyup.enter="handleLogin">
|
||||
<el-input v-model="loginForm.password" type="password" auto-complete="off" :placeholder="$t('login.password')" @keyup.enter="handleLogin">
|
||||
<template #prefix>
|
||||
<svg-icon name="password" class="el-input__icon input-icon" />
|
||||
<svg-icon name="password" class="input-icon" />
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" v-if="captchaOnOff != 'off'">
|
||||
<el-input
|
||||
v-model="loginForm.code"
|
||||
size="default"
|
||||
auto-complete="off"
|
||||
:placeholder="$t('login.captcha')"
|
||||
style="width: 63%"
|
||||
@keyup.enter="handleLogin">
|
||||
<el-input v-model="loginForm.code" auto-complete="off" :placeholder="$t('login.captcha')" style="width: 63%" @keyup.enter="handleLogin">
|
||||
<template #prefix>
|
||||
<svg-icon name="validCode" class="el-input__icon input-icon" />
|
||||
<svg-icon name="validCode" class="input-icon" />
|
||||
</template>
|
||||
</el-input>
|
||||
<div class="login-code">
|
||||
@@ -44,7 +32,10 @@
|
||||
|
||||
<div style="display: flex; justify-content: space-between">
|
||||
<el-checkbox v-model="loginForm.rememberMe">{{ $t('login.rememberMe') }}</el-checkbox>
|
||||
<router-link class="link-type" :to="'/register'">{{ $t('login.register') }}</router-link>
|
||||
<span style="font-size: 12px">
|
||||
<span @click="handleForgetPwd()" class="forget-pwd">忘记密码</span>
|
||||
<router-link class="link-type" :to="'/register'">{{ $t('login.register') }}</router-link>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<el-form-item style="width: 100%">
|
||||
@@ -167,15 +158,24 @@ function onAuth(type) {
|
||||
break
|
||||
}
|
||||
}
|
||||
function handleForgetPwd() {
|
||||
proxy.$modal.msg('请联系管理员')
|
||||
}
|
||||
getCode()
|
||||
getCookie()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/assets/styles/login.scss';
|
||||
.forget-pwd {
|
||||
color: #ccc;
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.login-icon {
|
||||
width: 30px;
|
||||
margin-right: 10px;
|
||||
height: 30px;
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.other-login {
|
||||
|
||||
@@ -152,8 +152,7 @@ getCode()
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background: radial-gradient(200% 100% at bottom center, #f7f7b6, #e96f92, #1b2947);
|
||||
background: radial-gradient(220% 105% at top center, #1b2947 10%, #75517d 40%, #e96f92 65%, #f7f7b6);
|
||||
background: radial-gradient(220% 105% at top center, #1b2947 10%, #4b76a7 40%, #81acae 65%, #f7f7b6);
|
||||
}
|
||||
.title {
|
||||
margin: 0px auto 30px auto;
|
||||
@@ -164,7 +163,7 @@ getCode()
|
||||
.register-form {
|
||||
border-radius: 6px;
|
||||
background: #fff;
|
||||
width: 310px;
|
||||
width: var(--base-login-width);
|
||||
padding: 25px 15px 5px 15px;
|
||||
.el-input {
|
||||
height: 38px;
|
||||
|
||||
@@ -49,7 +49,7 @@ if (callbackQuery.value && callbackQuery.value.state != null) {
|
||||
router.push({ path: redirect.value || '/' })
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error)
|
||||
console.error('login-error', error)
|
||||
proxy.$modal.msgError(error.msg)
|
||||
loading.value = false
|
||||
})
|
||||
@@ -60,6 +60,6 @@ if (callbackQuery.value && callbackQuery.value.state != null) {
|
||||
.loading {
|
||||
text-align: center;
|
||||
color: #ccc;
|
||||
padding: 10px;
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user