From 664bb39858987774b93779615405342dcc908021 Mon Sep 17 00:00:00 2001 From: xieyonghong <18010623010@163.com> Date: Mon, 10 Apr 2023 11:24:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=96=87=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/user/Login/index.vue | 88 ++++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 31 deletions(-) diff --git a/src/views/user/Login/index.vue b/src/views/user/Login/index.vue index 9ea0a1fb..ce2fdc2f 100644 --- a/src/views/user/Login/index.vue +++ b/src/views/user/Login/index.vue @@ -37,16 +37,11 @@ :model="form" class="login-form" @finish="onFinish" + :rules='rules' >
- 其他方式登录 + 其他登录方式
- - - + /> +
@@ -214,6 +197,39 @@ const form = reactive({ verifyKey: '', }); +const rules = { + username: [ + { + validator(_: any, value: string) { + if (!value) { + return Promise.reject('请输入账号!') + } + return Promise.resolve() + } + } + ], + password: [ + { + validator(_: any, value: string) { + if (!value) { + return Promise.reject('请输入密码!') + } + return Promise.resolve() + } + } + ], + verifyCode: [ + { + validator(_: any, value: string) { + if (!value) { + return Promise.reject('请输入验证码!') + } + return Promise.resolve() + } + } + ] +} + const codeUrl = ref(''); const codeConfig = ref(false); @@ -445,6 +461,15 @@ screenRotation(screenWidth.value, screenHeight.value); position: relative; bottom: 10px; text-align: center; + display: flex; + gap: 24px; + justify-content: center; + flex-wrap: wrap; + + .other-button-item { + cursor: pointer; + padding: 4px; + } } } @@ -529,7 +554,8 @@ screenRotation(screenWidth.value, screenHeight.value); } .content { - padding: 32px 0 24px; + padding: 32px 0 24px !important; + margin-top: 12% !important; } }