加油,奥里给!

This commit is contained in:
lzp
2026-03-31 15:11:50 +08:00
parent 9aa9018b1b
commit f931ce4927
5 changed files with 27 additions and 11 deletions

View File

@@ -1,7 +1,13 @@
<template>
<div class="depth-select">
<el-select :model-value="modelValue" @change="onChange" v-bind="attrs">
<el-option v-for="v in list" :key="v.value" :label="v.label" :value="v.value" />
<el-option
v-for="v in list"
:key="v.value"
:label="v.label"
:value="v.value"
:disabled="modelValue === v.value"
/>
</el-select>
</div>
</template>
@@ -22,6 +28,7 @@
<style scoped lang="less">
.depth-select {
&:deep(.el-select) {
--el-input-text-color: #000;
--el-select-input-font-size: 1.2rem;
.el-select__wrapper {
font-size: 1.2rem;
@@ -46,6 +53,11 @@
height: 3rem;
line-height: 3rem;
font-size: 1.2rem;
color: #000;
font-weight: 400;
&.is-disabled {
color: #909399;
}
}
}
}

View File

@@ -67,7 +67,7 @@
import { Login } from '@/api/user'
import { computed, reactive, ref } from 'vue'
import { useRouter } from 'vue-router'
import { validateEmail, validatePass, validatePrivacy } from './tools'
import { validateEmail, validatePassLength, validatePrivacy } from './tools'
import OtherLogin from './other-login.vue'
import VisibleCode from './visible-code.vue'
import { useUserInfoStore } from '@/stores'
@@ -77,14 +77,7 @@
const router = useRouter()
const ruleForm = reactive({
email: [{ validator: validateEmail, trigger: 'change' }],
password: [
{
min: 6,
max: 12,
message: t('Login.passwordLengthError', { min: 6, max: 12 }),
trigger: 'change'
}
],
password: [{ validator: validatePassLength, trigger: 'change' }],
privacy: [{ validator: validatePrivacy, trigger: 'change' }]
})
const isVisible = ref(false)

View File

@@ -37,6 +37,14 @@ export const validatePass = (rule, value, callback) => {
}
callback(str ? new Error(str) : undefined)
}
// 检查密码长度
export const validatePassLength = (rule, value, callback) => {
var str = ''
if (validateLength(value)) {
str = t('Login.passwordLengthError', { min: 6, max: 20 })
}
callback(str ? new Error(str) : undefined)
}
export const validatePrivacy = (rule, value, callback) => {
if (!value) {
callback(new Error(t('Login.pleaseTermsPolicy')))

View File

@@ -160,6 +160,8 @@
color: #252727;
text-align: center;
> .btns {
position: fixed;
bottom: 8rem;
width: 100%;
display: flex;
align-items: center;
@@ -305,7 +307,7 @@
height: 72.6rem;
left: 50%;
bottom: 0;
transform: translateX(-50%) translateY(80%);
transform: translateX(-50%) translateY(70%);
> div.bg-1 {
width: 48.4rem;
height: 57.2rem;

View File

@@ -78,6 +78,7 @@
width: 100%;
height: 100%;
border-radius: 1.6rem;
box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.1);
}
> .active {
position: absolute;