加油,奥里给!
This commit is contained in:
@@ -1,7 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="depth-select">
|
<div class="depth-select">
|
||||||
<el-select :model-value="modelValue" @change="onChange" v-bind="attrs">
|
<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>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -22,6 +28,7 @@
|
|||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.depth-select {
|
.depth-select {
|
||||||
&:deep(.el-select) {
|
&:deep(.el-select) {
|
||||||
|
--el-input-text-color: #000;
|
||||||
--el-select-input-font-size: 1.2rem;
|
--el-select-input-font-size: 1.2rem;
|
||||||
.el-select__wrapper {
|
.el-select__wrapper {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
@@ -46,6 +53,11 @@
|
|||||||
height: 3rem;
|
height: 3rem;
|
||||||
line-height: 3rem;
|
line-height: 3rem;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
|
color: #000;
|
||||||
|
font-weight: 400;
|
||||||
|
&.is-disabled {
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
import { Login } from '@/api/user'
|
import { Login } from '@/api/user'
|
||||||
import { computed, reactive, ref } from 'vue'
|
import { computed, reactive, ref } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { validateEmail, validatePass, validatePrivacy } from './tools'
|
import { validateEmail, validatePassLength, validatePrivacy } from './tools'
|
||||||
import OtherLogin from './other-login.vue'
|
import OtherLogin from './other-login.vue'
|
||||||
import VisibleCode from './visible-code.vue'
|
import VisibleCode from './visible-code.vue'
|
||||||
import { useUserInfoStore } from '@/stores'
|
import { useUserInfoStore } from '@/stores'
|
||||||
@@ -77,14 +77,7 @@
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const ruleForm = reactive({
|
const ruleForm = reactive({
|
||||||
email: [{ validator: validateEmail, trigger: 'change' }],
|
email: [{ validator: validateEmail, trigger: 'change' }],
|
||||||
password: [
|
password: [{ validator: validatePassLength, trigger: 'change' }],
|
||||||
{
|
|
||||||
min: 6,
|
|
||||||
max: 12,
|
|
||||||
message: t('Login.passwordLengthError', { min: 6, max: 12 }),
|
|
||||||
trigger: 'change'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
privacy: [{ validator: validatePrivacy, trigger: 'change' }]
|
privacy: [{ validator: validatePrivacy, trigger: 'change' }]
|
||||||
})
|
})
|
||||||
const isVisible = ref(false)
|
const isVisible = ref(false)
|
||||||
|
|||||||
@@ -37,6 +37,14 @@ export const validatePass = (rule, value, callback) => {
|
|||||||
}
|
}
|
||||||
callback(str ? new Error(str) : undefined)
|
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) => {
|
export const validatePrivacy = (rule, value, callback) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
callback(new Error(t('Login.pleaseTermsPolicy')))
|
callback(new Error(t('Login.pleaseTermsPolicy')))
|
||||||
|
|||||||
@@ -160,6 +160,8 @@
|
|||||||
color: #252727;
|
color: #252727;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
> .btns {
|
> .btns {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 8rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -305,7 +307,7 @@
|
|||||||
height: 72.6rem;
|
height: 72.6rem;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
transform: translateX(-50%) translateY(80%);
|
transform: translateX(-50%) translateY(70%);
|
||||||
> div.bg-1 {
|
> div.bg-1 {
|
||||||
width: 48.4rem;
|
width: 48.4rem;
|
||||||
height: 57.2rem;
|
height: 57.2rem;
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 1.6rem;
|
border-radius: 1.6rem;
|
||||||
|
box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
> .active {
|
> .active {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
Reference in New Issue
Block a user