✨ feat: 部分修改
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<div class="login" :class="{ 'dark': isDark }">
|
||||
<div class="login-container">
|
||||
<div class="login-right">
|
||||
<img :src="RightImage" alt="" class="right-img" />
|
||||
@@ -55,7 +55,9 @@ import { encrypt, decrypt } from "@/utils/jsencrypt"
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import useProductStore from '@/store/modules/product'
|
||||
import RightImage from '@/assets/images/right.png'
|
||||
import LogoImage from '@/assets/logo/logo.png'
|
||||
import { useDark } from "@vueuse/core"
|
||||
|
||||
const isDark = useDark()
|
||||
|
||||
const title = import.meta.env.VITE_APP_TITLE
|
||||
const userStore = useUserStore()
|
||||
@@ -152,115 +154,168 @@ getCookie()
|
||||
</script>
|
||||
|
||||
<style lang='scss' scoped>
|
||||
// 亮色主题(默认)
|
||||
.login {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-color: #1a1a1a;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
/* 亮色主题变量 */
|
||||
--color-bg-primary: #f5f7fa;
|
||||
--color-bg-form: #ffffff;
|
||||
--color-bg-input: #f0f2f5;
|
||||
--color-border-input: #dcdfe6;
|
||||
--color-text-primary: #303133;
|
||||
--color-text-secondary: #606266;
|
||||
--color-text-placeholder: #909399;
|
||||
--color-btn-primary: #409eff;
|
||||
--color-btn-primary-hover: #66b1ff;
|
||||
|
||||
.title {
|
||||
margin: 0px auto 30px auto;
|
||||
text-align: center;
|
||||
color: #ebebeb;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.title {
|
||||
margin: 0px auto 30px auto;
|
||||
text-align: center;
|
||||
color: var(--color-text-primary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.right-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.right-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.logo-img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.logo-img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.login-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
// height: 60%;
|
||||
width: 60%;
|
||||
padding: 25px 25px 5px 25px;
|
||||
}
|
||||
.login-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
width: 60%;
|
||||
padding: 25px 25px 5px 25px;
|
||||
}
|
||||
|
||||
:deep(.el-input__wrapper) {
|
||||
background: #333333;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #444444;
|
||||
}
|
||||
|
||||
.el-input {
|
||||
color: #ebebeb;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
z-index: 1;
|
||||
flex: 3;
|
||||
border-radius: 6px;
|
||||
background: #292929;
|
||||
padding: 25px;
|
||||
:deep(.el-input__wrapper) {
|
||||
background: var(--color-bg-input);
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--color-border-input);
|
||||
}
|
||||
|
||||
.el-input {
|
||||
height: 40px;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
input {
|
||||
.login-form {
|
||||
z-index: 1;
|
||||
flex: 3;
|
||||
border-radius: 6px;
|
||||
background: var(--color-bg-form);
|
||||
padding: 25px;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
||||
|
||||
.el-input {
|
||||
height: 40px;
|
||||
|
||||
input {
|
||||
height: 40px;
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
input::placeholder {
|
||||
color: var(--color-text-placeholder);
|
||||
}
|
||||
}
|
||||
|
||||
.input-icon {
|
||||
height: 39px;
|
||||
width: 14px;
|
||||
margin-left: 0px;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
.input-icon {
|
||||
height: 39px;
|
||||
width: 14px;
|
||||
margin-left: 0px;
|
||||
.login-right {
|
||||
display: flex;
|
||||
padding: 30px;
|
||||
flex: 4;
|
||||
}
|
||||
|
||||
.login-tip {
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.login-code {
|
||||
width: 33%;
|
||||
height: 40px;
|
||||
float: right;
|
||||
|
||||
img {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
|
||||
.el-login-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: var(--color-text-secondary);
|
||||
font-family: Arial;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.login-code-img {
|
||||
height: 40px;
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
/* Element组件样式调整 */
|
||||
:deep(.el-checkbox__label) {
|
||||
color: var(--color-text-primary);
|
||||
}
|
||||
|
||||
:deep(.el-button--primary) {
|
||||
background-color: var(--color-btn-primary);
|
||||
border-color: var(--color-btn-primary);
|
||||
}
|
||||
|
||||
:deep(.el-button--primary:hover) {
|
||||
background-color: var(--color-btn-primary-hover);
|
||||
border-color: var(--color-btn-primary-hover);
|
||||
}
|
||||
|
||||
:deep(.link-type) {
|
||||
color: var(--color-btn-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.login-right {
|
||||
display: flex;
|
||||
padding: 30px;
|
||||
// 暗色主题
|
||||
.login.dark {
|
||||
/* 暗色主题变量 - 覆盖亮色变量 */
|
||||
--color-bg-primary: #1a1a1a;
|
||||
--color-bg-form: #292929;
|
||||
--color-bg-input: #333333;
|
||||
--color-border-input: #444444;
|
||||
--color-text-primary: #ebebeb;
|
||||
--color-text-secondary: #bfbfbf;
|
||||
--color-text-placeholder: #999999;
|
||||
--color-btn-primary: #409eff;
|
||||
--color-btn-primary-hover: #66b1ff;
|
||||
|
||||
flex: 4;
|
||||
}
|
||||
|
||||
.login-tip {
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
|
||||
.login-code {
|
||||
width: 33%;
|
||||
height: 40px;
|
||||
float: right;
|
||||
|
||||
img {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
.login-form {
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.el-login-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-family: Arial;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.login-code-img {
|
||||
height: 40px;
|
||||
padding-left: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user