Commit be153b568c869f5d75667dd793e471f2e3c652d4

Authored by fengwotao
1 parent 592444b2

perf: 登录页手机登录和账号登录更换为图标形式

@@ -54,9 +54,17 @@ @@ -54,9 +54,17 @@
54 </Button> 54 </Button>
55 </ACol> --> 55 </ACol> -->
56 <ACol :md="11" :xs="24"> 56 <ACol :md="11" :xs="24">
57 - <Button block @click="setLoginState(LoginStateEnum.MOBILE)"> 57 + <!-- <Button block @click="setLoginState(LoginStateEnum.MOBILE)">
58 {{ t('sys.login.mobileSignInFormTitle') }} 58 {{ t('sys.login.mobileSignInFormTitle') }}
59 - </Button> 59 + </Button> -->
  60 + <div class="flex justify-center cursor-pointer">
  61 + <div
  62 + @click="setLoginState(LoginStateEnum.MOBILE)"
  63 + class="flex justify-center icon-button"
  64 + >
  65 + <phone-filled :style="{ fontSize: '18px' }" />
  66 + </div>
  67 + </div>
60 </ACol> 68 </ACol>
61 </ARow> 69 </ARow>
62 </Form> 70 </Form>
@@ -65,14 +73,13 @@ @@ -65,14 +73,13 @@
65 import { reactive, ref, unref, computed } from 'vue'; 73 import { reactive, ref, unref, computed } from 'vue';
66 import { Checkbox, Form, Input, Row, Col, Button } from 'ant-design-vue'; 74 import { Checkbox, Form, Input, Row, Col, Button } from 'ant-design-vue';
67 import LoginFormTitle from './LoginFormTitle.vue'; 75 import LoginFormTitle from './LoginFormTitle.vue';
68 -  
69 import { useI18n } from '/@/hooks/web/useI18n'; 76 import { useI18n } from '/@/hooks/web/useI18n';
70 import { useMessage } from '/@/hooks/web/useMessage'; 77 import { useMessage } from '/@/hooks/web/useMessage';
71 -  
72 import { useUserStore } from '/@/store/modules/user'; 78 import { useUserStore } from '/@/store/modules/user';
73 import { LoginStateEnum, useLoginState, useFormRules, useFormValid } from './useLogin'; 79 import { LoginStateEnum, useLoginState, useFormRules, useFormValid } from './useLogin';
74 import { getPlatForm } from '/@/api/oem'; 80 import { getPlatForm } from '/@/api/oem';
75 import { createLocalStorage, createSessionStorage } from '/@/utils/cache'; 81 import { createLocalStorage, createSessionStorage } from '/@/utils/cache';
  82 + import { PhoneFilled } from '@ant-design/icons-vue';
76 83
77 const ACol = Col; 84 const ACol = Col;
78 const ARow = Row; 85 const ARow = Row;
@@ -147,3 +154,13 @@ @@ -147,3 +154,13 @@
147 loading.value = false; 154 loading.value = false;
148 } 155 }
149 </script> 156 </script>
  157 +
  158 +<style lang="less" scoped>
  159 + .icon-button {
  160 + align-items: center;
  161 + border-radius: 50%;
  162 + background-color: #f7f7f7;
  163 + width: 2.8rem;
  164 + height: 2.8rem;
  165 + }
  166 +</style>
@@ -24,9 +24,14 @@ @@ -24,9 +24,14 @@
24 <Button type="primary" size="large" block @click="handleLogin" :loading="loading"> 24 <Button type="primary" size="large" block @click="handleLogin" :loading="loading">
25 {{ t('sys.login.loginButton') }} 25 {{ t('sys.login.loginButton') }}
26 </Button> 26 </Button>
27 - <Button size="large" block class="mt-4" @click="handleBackLogin"> 27 + <!-- <Button size="large" block class="mt-4" @click="handleBackLogin">
28 {{ t('sys.login.backSignIn') }} 28 {{ t('sys.login.backSignIn') }}
29 - </Button> 29 + </Button> -->
  30 + <div class="flex justify-center cursor-pointer mt-4">
  31 + <div @click="handleBackLogin" class="flex justify-center icon-button">
  32 + <contacts-filled :style="{ fontSize: '18px' }" />
  33 + </div>
  34 + </div>
30 </FormItem> 35 </FormItem>
31 </Form> 36 </Form>
32 </template> 37 </template>
@@ -41,6 +46,7 @@ @@ -41,6 +46,7 @@
41 import { SendLoginSmsCode } from '/@/api/sys/user'; 46 import { SendLoginSmsCode } from '/@/api/sys/user';
42 import { useUserStore } from '/@/store/modules/user'; 47 import { useUserStore } from '/@/store/modules/user';
43 import { useMessage } from '/@/hooks/web/useMessage'; 48 import { useMessage } from '/@/hooks/web/useMessage';
  49 + import { ContactsFilled } from '@ant-design/icons-vue';
44 const { notification } = useMessage(); 50 const { notification } = useMessage();
45 51
46 const FormItem = Form.Item; 52 const FormItem = Form.Item;
@@ -95,3 +101,12 @@ @@ -95,3 +101,12 @@
95 } 101 }
96 } 102 }
97 </script> 103 </script>
  104 +<style lang="less" scoped>
  105 + .icon-button {
  106 + align-items: center;
  107 + border-radius: 50%;
  108 + background-color: #f7f7f7;
  109 + width: 2.8rem;
  110 + height: 2.8rem;
  111 + }
  112 +</style>