加油,奥里给!
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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')))
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user