Login.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <div
  3. :class="prefixCls"
  4. class="h-[100%] relative <xl:bg-v-dark <sm:px-10px <xl:px-10px <md:px-10px"
  5. >
  6. <div class="relative h-full flex mx-auto">
  7. <div
  8. :class="`${prefixCls}__left flex-1 bg-gray-500 bg-opacity-20 relative p-30px <xl:hidden`"
  9. >
  10. <!-- 左上角的 logo + 系统标题 -->
  11. <div class="flex items-center relative text-white">
  12. <img alt="" class="w-48px h-48px mr-10px" src="@/assets/imgs/logo.png" />
  13. <span class="text-20px font-bold">Tabemate Pro オーダーシステム</span>
  14. </div>
  15. <!-- 左边的背景图 + 欢迎语 -->
  16. <div class="flex justify-center items-center h-[calc(100%-60px)]">
  17. <TransitionGroup
  18. appear
  19. enter-active-class="animate__animated animate__bounceInLeft"
  20. tag="div"
  21. >
  22. <img key="1" alt="" class="w-500px" src="@/assets/imgs/login_bg.png" />
  23. <div key="2" class="text-3xl text-white" style="text-align: center;">Tabemate Pro オーダーシステムへようこそ</div>
  24. <!-- <div key="3" class="mt-5 font-normal text-white text-14px">
  25. {{ t('login.message') }}
  26. </div> -->
  27. </TransitionGroup>
  28. </div>
  29. </div>
  30. <div class="flex-1 p-30px <sm:p-10px dark:bg-v-dark relative">
  31. <!-- 右上角的主题、语言选择 -->
  32. <div class="flex justify-between items-center text-white @2xl:justify-end @xl:justify-end">
  33. <div class="flex items-center @2xl:hidden xl:hidden">
  34. <img alt="" class="w-48px h-48px mr-10px @gl:hidden" src="@/assets/imgs/logo.png" />
  35. <span class="text-20px font-bold c-black">Tabemate Pro オーダーシステム</span>
  36. </div>
  37. <div class="flex justify-end items-center space-x-10px">
  38. <!-- <ThemeSwitch /> -->
  39. <!-- <LocaleDropdown class="<xl:text-white dark:text-white" /> -->
  40. </div>
  41. </div>
  42. <!-- 右边的登录界面 -->
  43. <Transition appear enter-active-class="animate__animated animate__bounceInRight">
  44. <div
  45. class="h-full flex items-center m-auto w-[100%] @2xl:max-w-500px @xl:max-w-500px @md:max-w-500px @lg:max-w-500px"
  46. >
  47. <!-- 账号登录 -->
  48. <LoginForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" />
  49. <!-- 手机登录 -->
  50. <!-- <MobileForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" />
  51. 二维码登录 -->
  52. <!-- <QrCodeForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" />
  53. 注册 -->
  54. <!-- <RegisterForm class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> -->
  55. <!-- 三方登录 -->
  56. <!-- <SSOLoginVue class="p-20px h-auto m-auto <xl:(rounded-3xl light:bg-white)" /> -->
  57. </div>
  58. </Transition>
  59. </div>
  60. </div>
  61. </div>
  62. </template>
  63. <script lang="ts" name="Login" setup>
  64. // import { underlineToHump } from '@/utils'
  65. import { useDesign } from '@/hooks/web/useDesign'
  66. import { useAppStore } from '@/store/modules/app'
  67. //import { ThemeSwitch } from '@/layout/components/ThemeSwitch'
  68. //import { LocaleDropdown } from '@/layout/components/LocaleDropdown'
  69. import { LoginForm } from './components'
  70. // import { LoginForm, MobileForm, QrCodeForm, RegisterForm, SSOLoginVue } from './components'
  71. // const { t } = useI18n()
  72. const appStore = useAppStore()
  73. const { getPrefixCls } = useDesign()
  74. const prefixCls = getPrefixCls('login')
  75. appStore.setIsDark(false)
  76. </script>
  77. <style lang="scss" scoped>
  78. $prefix-cls: #{$namespace}-login;
  79. .#{$prefix-cls} {
  80. &__left {
  81. &::before {
  82. position: absolute;
  83. top: 0;
  84. left: 0;
  85. z-index: -1;
  86. width: 100%;
  87. height: 100%;
  88. background-image: url('@/assets/svgs/login-bg.svg');
  89. background-position: center;
  90. background-repeat: no-repeat;
  91. content: '';
  92. }
  93. }
  94. }
  95. </style>