提交代码
This commit is contained in:
@@ -11,7 +11,10 @@ const emit = defineEmits<{
|
||||
success: []
|
||||
}>()
|
||||
|
||||
const password = ref('')
|
||||
/** 默认填入测试密码,开发与正式环境均生效;上线前需改回空字符串 */
|
||||
const DEFAULT_PASSWORD = '123456'
|
||||
|
||||
const password = ref(DEFAULT_PASSWORD)
|
||||
const error = ref('')
|
||||
const submitting = ref(false)
|
||||
const inputElement = ref<HTMLInputElement | null>(null)
|
||||
@@ -51,7 +54,7 @@ watch(
|
||||
() => props.open,
|
||||
async (open) => {
|
||||
if (open) {
|
||||
password.value = ''
|
||||
password.value = DEFAULT_PASSWORD
|
||||
error.value = ''
|
||||
window.addEventListener('keydown', onKeydown)
|
||||
await nextTick()
|
||||
@@ -142,17 +145,21 @@ onBeforeUnmount(() => {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 24px;
|
||||
background: rgba(18, 33, 54, 0.44);
|
||||
backdrop-filter: blur(5px);
|
||||
background: rgba(3, 8, 18, 0.68);
|
||||
backdrop-filter: blur(8px);
|
||||
}
|
||||
|
||||
.auth-card {
|
||||
width: 560px;
|
||||
padding: 42px 44px 38px;
|
||||
border: 1px solid rgba(255, 255, 255, 0.65);
|
||||
border-radius: 24px;
|
||||
background: #fff;
|
||||
box-shadow: 0 30px 80px rgba(12, 30, 55, 0.3);
|
||||
border: 1px solid rgba(130, 175, 255, 0.2);
|
||||
border-radius: 26px;
|
||||
background: linear-gradient(158deg, rgba(22, 42, 78, 0.98) 0%, rgba(8, 16, 32, 0.99) 100%);
|
||||
box-shadow:
|
||||
0 40px 90px rgba(0, 6, 20, 0.6),
|
||||
0 0 50px rgba(48, 118, 255, 0.12),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
||||
color-scheme: dark;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -162,10 +169,13 @@ onBeforeUnmount(() => {
|
||||
width: 86px;
|
||||
height: 86px;
|
||||
margin: 0 auto 24px;
|
||||
border: 1px solid rgba(120, 200, 255, 0.3);
|
||||
border-radius: 50%;
|
||||
color: var(--blue);
|
||||
background: linear-gradient(145deg, #f1f7ff, #dfeaff);
|
||||
box-shadow: inset 0 1px 0 #fff, 0 8px 22px rgba(47, 111, 208, 0.14);
|
||||
background: rgba(70, 140, 255, 0.14);
|
||||
box-shadow:
|
||||
0 0 32px rgba(70, 140, 255, 0.22),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
color: #7fe0ff;
|
||||
}
|
||||
|
||||
.auth-card__icon svg {
|
||||
@@ -174,15 +184,16 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
|
||||
.auth-card h2 {
|
||||
color: #1f2937;
|
||||
color: #eef5ff;
|
||||
font-size: 30px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 1px;
|
||||
text-shadow: 0 0 24px rgba(80, 150, 255, 0.28);
|
||||
}
|
||||
|
||||
.auth-card p {
|
||||
margin-top: 14px;
|
||||
color: #778394;
|
||||
color: rgba(158, 190, 226, 0.7);
|
||||
font-size: 19px;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
@@ -195,9 +206,11 @@ onBeforeUnmount(() => {
|
||||
width: 100%;
|
||||
height: 62px;
|
||||
padding: 0 22px;
|
||||
border: 2px solid var(--line-strong);
|
||||
border: 1px solid rgba(130, 175, 255, 0.22);
|
||||
border-radius: 12px;
|
||||
color: var(--ink);
|
||||
background: rgba(6, 14, 28, 0.7);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
|
||||
color: #e8f2ff;
|
||||
font-family: inherit;
|
||||
font-size: 22px;
|
||||
letter-spacing: 2px;
|
||||
@@ -205,18 +218,24 @@ onBeforeUnmount(() => {
|
||||
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
||||
}
|
||||
|
||||
.auth-card__input::placeholder {
|
||||
color: rgba(158, 190, 226, 0.4);
|
||||
}
|
||||
|
||||
.auth-card__input:focus {
|
||||
border-color: var(--blue);
|
||||
box-shadow: 0 0 0 4px rgba(47, 111, 208, 0.14);
|
||||
border-color: rgba(120, 200, 255, 0.55);
|
||||
box-shadow:
|
||||
0 0 0 4px rgba(70, 140, 255, 0.15),
|
||||
0 0 24px rgba(70, 140, 255, 0.12);
|
||||
}
|
||||
|
||||
.auth-card__input:disabled {
|
||||
background: #f4f6f9;
|
||||
background: rgba(4, 10, 22, 0.8);
|
||||
}
|
||||
|
||||
.auth-card__error {
|
||||
margin-top: 12px;
|
||||
color: var(--red);
|
||||
color: #ff9d9d;
|
||||
font-size: 17px;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
@@ -234,33 +253,45 @@ onBeforeUnmount(() => {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 3px;
|
||||
transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
|
||||
transition:
|
||||
transform 0.2s ease,
|
||||
box-shadow 0.2s ease,
|
||||
background 0.2s ease,
|
||||
border-color 0.2s ease;
|
||||
}
|
||||
|
||||
.auth-card__button:disabled {
|
||||
cursor: default;
|
||||
opacity: 0.65;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.auth-card__button--ghost {
|
||||
border: 2px solid var(--line-strong);
|
||||
color: var(--ink-soft);
|
||||
background: #fff;
|
||||
border: 1px solid rgba(130, 175, 255, 0.28);
|
||||
background: rgba(18, 40, 78, 0.5);
|
||||
color: #bcd9ff;
|
||||
}
|
||||
|
||||
.auth-card__button--ghost:hover:not(:disabled) {
|
||||
background: var(--surface-soft);
|
||||
border-color: rgba(150, 205, 255, 0.5);
|
||||
background: rgba(30, 66, 128, 0.6);
|
||||
}
|
||||
|
||||
.auth-card__button--primary {
|
||||
color: #fff;
|
||||
background: linear-gradient(180deg, #4b89e4 0%, #2f6fd0 100%);
|
||||
box-shadow: 0 10px 22px rgba(47, 111, 208, 0.28);
|
||||
background: linear-gradient(180deg, #ffd166 0%, #f0ac0b 100%);
|
||||
box-shadow:
|
||||
0 14px 30px rgba(240, 172, 11, 0.28),
|
||||
0 0 26px rgba(255, 190, 60, 0.16),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.6);
|
||||
color: #241500;
|
||||
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
.auth-card__button--primary:hover:not(:disabled) {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 14px 28px rgba(47, 111, 208, 0.36);
|
||||
box-shadow:
|
||||
0 18px 38px rgba(240, 172, 11, 0.36),
|
||||
0 0 34px rgba(255, 190, 60, 0.26),
|
||||
inset 0 1px 0 rgba(255, 255, 255, 0.6);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.auth-modal-enter-active,
|
||||
|
||||
Reference in New Issue
Block a user