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; } }