Compare commits

..

No commits in common. "f87d23abebdad2e917ac8f55c5a919921b4a1c1c" and "9bbecc5baa902b22aaf1eb9931f9dae51563a474" have entirely different histories.

3 changed files with 92 additions and 157 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 313 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -1,169 +1,104 @@
<template> <template>
<div :class="prefixCls" class="relative h-[100%] lt-md:px-10px lt-sm:px-10px"> <div
<div class="relative mx-auto h-full flex"> :class="prefixCls"
<!-- <div :class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden`"> --> class="relative h-[100%] lt-md:px-10px lt-sm:px-10px lt-xl:px-10px lt-xl:px-10px"
<!-- 左上角的 logo + 系统标题 --> >
<!-- <div class="relative flex items-center text-white"> <div class="relative mx-auto h-full flex">
<img alt="" class="mr-10px w-48px" src="@/assets/imgs/zy-logo.jpg" /> <div
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span> :class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px lt-xl:hidden`"
</div> --> >
<!-- 左边的背景图 + 欢迎语 --> <!-- 左上角的 logo + 系统标题 -->
<!-- <div class="h-[calc(100%-60px)] flex items-center justify-center"> <div class="relative flex items-center text-white">
<TransitionGroup appear enter-active-class="animate__animated animate__bounceInLeft" tag="div"> <img alt="" class="mr-10px w-48px" src="@/assets/imgs/zy-logo.jpg" />
<img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" /> <span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
<div key="2" class="text-3xl text-white">{{ t('login.welcome') }}</div> </div>
<div key="3" class="mt-5 text-14px font-normal text-white"> <!-- 左边的背景图 + 欢迎语 -->
{{ t('login.message') }} <div class="h-[calc(100%-60px)] flex items-center justify-center">
</div> <TransitionGroup
</TransitionGroup> appear
</div> --> enter-active-class="animate__animated animate__bounceInLeft"
<!-- </div> --> tag="div"
<div class="login relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px"> >
<!-- 右上角的主题语言选择 --> <img key="1" alt="" class="w-350px" src="@/assets/svgs/login-box-bg.svg" />
<div class="flex items-center justify-between text-white at-2xl:justify-end at-xl:justify-end"> <div key="2" class="text-3xl text-white">{{ t('login.welcome') }}</div>
<div class="flex items-center at-2xl:hidden at-xl:hidden"> <div key="3" class="mt-5 text-14px font-normal text-white">
<img alt="" class="mr-10px w-48px" src="@/assets/imgs/logo.png" /> {{ t('login.message') }}
<span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span> </div>
</div> </TransitionGroup>
<div class="flex items-center justify-end space-x-10px"> </div>
<ThemeSwitch /> </div>
<LocaleDropdown class="dark:text-white lt-xl:text-white" /> <div class="relative flex-1 p-30px dark:bg-[var(--login-bg-color)] lt-sm:p-10px">
</div> <!-- 右上角的主题语言选择 -->
</div> <div
<!-- 右边的登录界面 --> class="flex items-center justify-between text-white at-2xl:justify-end at-xl:justify-end"
<Transition appear enter-active-class="animate__animated animate__bounceInRight"> >
<!-- at-2xl:max-w-500px at-lg:max-w-500px at-md:max-w-500px at-xl:max-w-500px --> <div class="flex items-center at-2xl:hidden at-xl:hidden">
<div class="login-cont m-auto h-full w-[100%] flex items-center "> <img alt="" class="mr-10px w-48px" src="@/assets/imgs/logo.png" />
<div class="xia"> <span class="text-20px font-bold">{{ underlineToHump(appStore.getTitle) }}</span>
<div class="left"> </div>
<img src="@/assets/imgs/login-back-left.png" alt="" /> <div class="flex items-center justify-end space-x-10px">
</div> <ThemeSwitch />
<div class="right"> <LocaleDropdown class="dark:text-white lt-xl:text-white" />
<!-- 账号登录 --> </div>
<LoginForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" /> </div>
<!-- 手机登录 --> <!-- 右边的登录界面 -->
<MobileForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" /> <Transition appear enter-active-class="animate__animated animate__bounceInRight">
<!-- 二维码登录 --> <div
<QrCodeForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" /> 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"
<!-- 注册 --> >
<RegisterForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" /> <!-- 账号登录 -->
<!-- 三方登录 --> <LoginForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
<SSOLoginVue class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" /> <!-- 手机登录 -->
</div> <MobileForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
</div> <!-- 二维码登录 -->
</div> <QrCodeForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
</Transition> <!-- 注册 -->
</div> <RegisterForm class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
</div> <!-- 三方登录 -->
</div> <SSOLoginVue class="m-auto h-auto p-20px lt-xl:(rounded-3xl light:bg-white)" />
</div>
</Transition>
</div>
</div>
</div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { underlineToHump } from '@/utils' import { underlineToHump } from '@/utils'
import { useDesign } from '@/hooks/web/useDesign' import { useDesign } from '@/hooks/web/useDesign'
import { useAppStore } from '@/store/modules/app' import { useAppStore } from '@/store/modules/app'
import { ThemeSwitch } from '@/layout/components/ThemeSwitch' import { ThemeSwitch } from '@/layout/components/ThemeSwitch'
import { LocaleDropdown } from '@/layout/components/LocaleDropdown' import { LocaleDropdown } from '@/layout/components/LocaleDropdown'
import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue } from './components' import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue } from './components'
defineOptions({ name: 'Login' }) defineOptions({ name: 'Login' })
const { t } = useI18n() const { t } = useI18n()
const appStore = useAppStore() const appStore = useAppStore()
const { getPrefixCls } = useDesign() const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('login') const prefixCls = getPrefixCls('login')
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
$prefix-cls: #{$namespace}-login;
$prefix-cls: #{$namespace}-login;
.#{$prefix-cls} { .#{$prefix-cls} {
overflow: auto; overflow: auto;
&__left { &__left {
&::before { &::before {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: -1; z-index: -1;
width: 100%; width: 100%;
height: 100%; height: 100%;
background-image: url('@/assets/svgs/login-bg.svg'); background-image: url('@/assets/svgs/login-bg.svg');
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
content: ''; content: '';
} }
} }
} }
</style>
.login{
background:url('@/assets/imgs/login-back.png') no-repeat;
background-size:cover;
.login-cont{
width: 800px;
height: 100%;
background: transparent;
border-radius: 21px;
display: flex;
overflow: hidden;
.xia{
display:flex;
.left{
width: 50%;
display: flex;
img{
width: 100%;
}
}
.right{
flex:1;
background: white;
}
}
}
}
@media screen and (min-width:1001px){
::v-deep .el-form-item__content{
h2{
color:black;
}
}
}
@media screen and (max-width:1000px){
.login{
background:transparent;
background-size:cover;
.login-cont{
width: 100%;
height: 100%;
border-radius: 21px;
display:flex;
background: transparent;
.xia{
.left{
width: 50%;
display: flex;
display:none;
img{
width: 100%;
}
}
.right{
flex:1;
background: transparent !important;
}
}
}
}
}
</style>