Commit cebc6a590e1a19af7380a55aed43b23af274df0a
1 parent
525484e7
fix(login): fix `auto fill` style in dark-theme
修复黑暗主题下的自动填充表单域样式
Showing
4 changed files
with
28 additions
and
4 deletions
src/views/sys/login/Login.vue
@@ -140,6 +140,12 @@ | @@ -140,6 +140,12 @@ | ||
140 | color: #fff; | 140 | color: #fff; |
141 | } | 141 | } |
142 | } | 142 | } |
143 | + | ||
144 | + input.fix-auto-fill, | ||
145 | + .fix-auto-fill input { | ||
146 | + -webkit-text-fill-color: #c9d1d9 !important; | ||
147 | + box-shadow: inherit !important; | ||
148 | + } | ||
143 | } | 149 | } |
144 | 150 | ||
145 | .@{prefix-cls} { | 151 | .@{prefix-cls} { |
src/views/sys/login/LoginForm.vue
@@ -9,7 +9,12 @@ | @@ -9,7 +9,12 @@ | ||
9 | @keypress.enter="handleLogin" | 9 | @keypress.enter="handleLogin" |
10 | > | 10 | > |
11 | <FormItem name="account" class="enter-x"> | 11 | <FormItem name="account" class="enter-x"> |
12 | - <Input size="large" v-model:value="formData.account" :placeholder="t('sys.login.userName')" /> | 12 | + <Input |
13 | + size="large" | ||
14 | + v-model:value="formData.account" | ||
15 | + :placeholder="t('sys.login.userName')" | ||
16 | + class="fix-auto-fill" | ||
17 | + /> | ||
13 | </FormItem> | 18 | </FormItem> |
14 | <FormItem name="password" class="enter-x"> | 19 | <FormItem name="password" class="enter-x"> |
15 | <InputPassword | 20 | <InputPassword |
src/views/sys/login/MobileForm.vue
@@ -3,11 +3,17 @@ | @@ -3,11 +3,17 @@ | ||
3 | <LoginFormTitle class="enter-x" /> | 3 | <LoginFormTitle class="enter-x" /> |
4 | <Form class="p-4 enter-x" :model="formData" :rules="getFormRules" ref="formRef"> | 4 | <Form class="p-4 enter-x" :model="formData" :rules="getFormRules" ref="formRef"> |
5 | <FormItem name="mobile" class="enter-x"> | 5 | <FormItem name="mobile" class="enter-x"> |
6 | - <Input size="large" v-model:value="formData.mobile" :placeholder="t('sys.login.mobile')" /> | 6 | + <Input |
7 | + size="large" | ||
8 | + v-model:value="formData.mobile" | ||
9 | + :placeholder="t('sys.login.mobile')" | ||
10 | + class="fix-auto-fill" | ||
11 | + /> | ||
7 | </FormItem> | 12 | </FormItem> |
8 | <FormItem name="sms" class="enter-x"> | 13 | <FormItem name="sms" class="enter-x"> |
9 | <CountdownInput | 14 | <CountdownInput |
10 | size="large" | 15 | size="large" |
16 | + class="fix-auto-fill" | ||
11 | v-model:value="formData.sms" | 17 | v-model:value="formData.sms" |
12 | :placeholder="t('sys.login.smsCode')" | 18 | :placeholder="t('sys.login.smsCode')" |
13 | /> | 19 | /> |
src/views/sys/login/RegisterForm.vue
@@ -4,17 +4,24 @@ | @@ -4,17 +4,24 @@ | ||
4 | <Form class="p-4 enter-x" :model="formData" :rules="getFormRules" ref="formRef"> | 4 | <Form class="p-4 enter-x" :model="formData" :rules="getFormRules" ref="formRef"> |
5 | <FormItem name="account" class="enter-x"> | 5 | <FormItem name="account" class="enter-x"> |
6 | <Input | 6 | <Input |
7 | + class="fix-auto-fill" | ||
7 | size="large" | 8 | size="large" |
8 | v-model:value="formData.account" | 9 | v-model:value="formData.account" |
9 | :placeholder="t('sys.login.userName')" | 10 | :placeholder="t('sys.login.userName')" |
10 | /> | 11 | /> |
11 | </FormItem> | 12 | </FormItem> |
12 | <FormItem name="mobile" class="enter-x"> | 13 | <FormItem name="mobile" class="enter-x"> |
13 | - <Input size="large" v-model:value="formData.mobile" :placeholder="t('sys.login.mobile')" /> | 14 | + <Input |
15 | + size="large" | ||
16 | + v-model:value="formData.mobile" | ||
17 | + :placeholder="t('sys.login.mobile')" | ||
18 | + class="fix-auto-fill" | ||
19 | + /> | ||
14 | </FormItem> | 20 | </FormItem> |
15 | <FormItem name="sms" class="enter-x"> | 21 | <FormItem name="sms" class="enter-x"> |
16 | <CountdownInput | 22 | <CountdownInput |
17 | size="large" | 23 | size="large" |
24 | + class="fix-auto-fill" | ||
18 | v-model:value="formData.sms" | 25 | v-model:value="formData.sms" |
19 | :placeholder="t('sys.login.smsCode')" | 26 | :placeholder="t('sys.login.smsCode')" |
20 | /> | 27 | /> |
@@ -52,7 +59,7 @@ | @@ -52,7 +59,7 @@ | ||
52 | > | 59 | > |
53 | {{ t('sys.login.registerButton') }} | 60 | {{ t('sys.login.registerButton') }} |
54 | </Button> | 61 | </Button> |
55 | - <Button size="large" block class="enter-x mt-4" @click="handleBackLogin"> | 62 | + <Button size="large" block class="mt-4 enter-x" @click="handleBackLogin"> |
56 | {{ t('sys.login.backSignIn') }} | 63 | {{ t('sys.login.backSignIn') }} |
57 | </Button> | 64 | </Button> |
58 | </Form> | 65 | </Form> |