Skip to content

Commit 1a4c717

Browse files
author
preschool
committed
🎈 perf:优化登录窗口高度、登录页入场动画、登录页暗黑模式下分割线和二维码背景色
1 parent c49641d commit 1a4c717

File tree

8 files changed

+29
-13
lines changed

8 files changed

+29
-13
lines changed

src/styles/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
@import './var.css';
22
@import './FormCreate/index.scss';
3+
@import './theme.scss';
34
@import 'element-plus/theme-chalk/dark/css-vars.css';
45

56
.reset-margin [class*='el-icon'] + span {

src/styles/theme.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,14 @@
44
// .dark .dark\:text-color {
55
// color: rgba(255, 255, 255, var(--dark-text-color));
66
// }
7+
8+
// 登录页
9+
.dark .login-form {
10+
.el-divider__text {
11+
background-color: var(--login-bg-color);
12+
}
13+
14+
.el-card {
15+
background-color: var(--login-bg-color);
16+
}
17+
}

src/views/Login/Login.vue

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
>
66
<div class="relative mx-auto h-full flex">
77
<div
8-
:class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden`"
8+
:class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden overflow-x-hidden overflow-y-auto`"
99
>
1010
<!-- 左上角的 logo + 系统标题 -->
1111
<div class="relative flex items-center text-white">
@@ -27,7 +27,9 @@
2727
</TransitionGroup>
2828
</div>
2929
</div>
30-
<div class="relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px">
30+
<div
31+
class="relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px overflow-x-hidden overflow-y-auto"
32+
>
3133
<!-- 右上角的主题、语言选择 -->
3234
<div
3335
class="flex items-center justify-between text-white at-2xl:justify-end at-xl:justify-end"
@@ -36,15 +38,15 @@
3638
<img alt="" class="mr-10px h-48px w-48px" src="@/assets/imgs/logo.png" />
3739
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
3840
</div>
39-
<div class="flex items-center justify-end space-x-10px">
41+
<div class="flex items-center justify-end space-x-10px h-48px">
4042
<ThemeSwitch />
4143
<LocaleDropdown class="dark:text-white lt-xl:text-white" />
4244
</div>
4345
</div>
4446
<!-- 右边的登录界面 -->
4547
<Transition appear enter-active-class="animate__animated animate__bounceInRight">
4648
<div
47-
class="m-auto h-full w-[100%] flex items-center at-2xl:max-w-500px at-lg:max-w-500px at-md:max-w-500px at-xl:max-w-500px"
49+
class="m-auto h-[calc(100%-60px)] w-[100%] flex items-center at-2xl:max-w-500px at-lg:max-w-500px at-md:max-w-500px at-xl:max-w-500px"
4850
>
4951
<!-- 账号登录 -->
5052
<LoginForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />

src/views/Login/SocialLogin.vue

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<template>
22
<div
33
:class="prefixCls"
4-
class="relative h-[100%] lt-xl:bg-[var(--login-bg-color)] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px"
4+
class="relative h-[100%] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px lt-xl:px-10px"
55
>
66
<div class="relative mx-auto h-full flex">
77
<div
8-
:class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden`"
8+
:class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden overflow-x-hidden overflow-y-auto`"
99
>
1010
<!-- 左上角的 logo + 系统标题 -->
1111
<div class="relative flex items-center text-white">
@@ -27,7 +27,9 @@
2727
</TransitionGroup>
2828
</div>
2929
</div>
30-
<div class="relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px">
30+
<div
31+
class="relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px overflow-x-hidden overflow-y-auto"
32+
>
3133
<!-- 右上角的主题、语言选择 -->
3234
<div
3335
class="flex items-center justify-between text-white at-2xl:justify-end at-xl:justify-end"
@@ -36,15 +38,15 @@
3638
<img alt="" class="mr-10px h-48px w-48px" src="@/assets/imgs/logo.png" />
3739
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
3840
</div>
39-
<div class="flex items-center justify-end space-x-10px">
41+
<div class="flex items-center justify-end space-x-10px h-48px">
4042
<ThemeSwitch />
4143
<LocaleDropdown class="dark:text-white lt-xl:text-white" />
4244
</div>
4345
</div>
4446
<!-- 右边的登录界面 -->
4547
<Transition appear enter-active-class="animate__animated animate__bounceInRight">
4648
<div
47-
class="m-auto h-full w-[100%] flex items-center at-2xl:max-w-500px at-lg:max-w-500px at-md:max-w-500px at-xl:max-w-500px"
49+
class="m-auto h-[calc(100%-60px)] w-[100%] flex items-center at-2xl:max-w-500px at-lg:max-w-500px at-md:max-w-500px at-xl:max-w-500px"
4850
>
4951
<!-- 账号登录 -->
5052
<el-form

src/views/Login/components/QrCodeForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<el-row v-show="getShow" style="margin-right: -10px; margin-left: -10px">
2+
<el-row class="login-form" v-show="getShow" style="margin-right: -10px; margin-left: -10px">
33
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
44
<LoginFormTitle style="width: 100%" />
55
</el-col>

src/views/Login/components/RegisterForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
v-show="getShow"
44
:rules="rules"
55
:schema="schema"
6-
class="dark:(border-1 border-[var(--el-border-color)] border-solid)"
6+
class="w-[100%] dark:(border-1 border-[var(--el-border-color)] border-solid)"
77
hide-required-asterisk
88
label-position="top"
99
size="large"

src/views/ai/write/index/components/Left.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
import { createReusableTemplate } from '@vueuse/core'
105105
import { ref } from 'vue'
106106
import Tag from './Tag.vue'
107-
import { WriteVO } from 'src/api/ai/write'
107+
import { WriteVO } from '@/api/ai/write'
108108
import { omit } from 'lodash-es'
109109
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
110110
import { AiWriteTypeEnum, WriteExample } from '@/views/ai/utils/constants'

src/views/mall/promotion/kefu/components/history/MemberBrowsingHistory.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import OrderBrowsingHistory from './OrderBrowsingHistory.vue'
2525
import { KeFuConversationRespVO } from '@/api/mall/promotion/kefu/conversation'
2626
import { isEmpty } from '@/utils/is'
2727
import { debounce } from 'lodash-es'
28-
import { ElScrollbar as ElScrollbarType } from 'element-plus/es/components/scrollbar'
28+
import { ElScrollbar as ElScrollbarType } from 'element-plus/es/components/scrollbar/index'
2929
3030
defineOptions({ name: 'MemberBrowsingHistory' })
3131

0 commit comments

Comments
 (0)