1
0

Login.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <!-- eslint-disable vue/multi-word-component-names -->
  2. <template>
  3. <!-- <AdaptiveContainer :options="{ width: 1920, height: 1080 }" style="overflow-y: hidden"> -->
  4. <div class="login-container" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%">
  5. <div class="login-bg"></div>
  6. <span class="-enter-x xl:hidden">
  7. <AppLogo :alwaysShowTitle="true" />
  8. </span>
  9. <div class="top-header">
  10. <div class="top-bg"></div>
  11. <div class="login-icon"></div>
  12. <div class="title">{{ title }}</div>
  13. </div>
  14. <div class="flex center">
  15. <LoginForm />
  16. </div>
  17. <div class="bottom"> </div>
  18. </div>
  19. <!-- </AdaptiveContainer> -->
  20. </template>
  21. <script lang="ts" setup>
  22. import { computed } from 'vue';
  23. import { AppLogo } from '/@/components/Application';
  24. import LoginForm from './LoginForm.vue';
  25. import { useGlobSetting } from '/@/hooks/setting';
  26. // import { useI18n } from '/@/hooks/web/useI18n';
  27. // import { useDesign } from '/@/hooks/web/useDesign';
  28. // import { useLocaleStore } from '/@/store/modules/locale';
  29. import { useLoginState } from './useLogin';
  30. // import AdaptiveContainer from '/@/components/Container/src/Adaptive.vue';
  31. defineProps({
  32. sessionTimeout: {
  33. type: Boolean,
  34. },
  35. });
  36. const globSetting = useGlobSetting();
  37. // const { prefixCls } = useDesign('login');
  38. // const { t } = useI18n();
  39. // const localeStore = useLocaleStore();
  40. // const showLocale = localeStore.getShowPicker;
  41. const title = computed(() => globSetting?.title ?? '');
  42. const { handleBackLogin } = useLoginState();
  43. handleBackLogin();
  44. </script>
  45. <style lang="less" scoped>
  46. @import '/@/design/theme.less';
  47. @prefix-cls: ~'@{namespace}-login';
  48. @logo-prefix-cls: ~'@{namespace}-app-logo';
  49. @countdown-prefix-cls: ~'@{namespace}-countdown-input';
  50. @dark-bg: #293146;
  51. @ventSpace: zxm;
  52. html[data-theme='dark'] {
  53. .@{prefix-cls} {
  54. background-color: @dark-bg;
  55. &::before {
  56. background-image: url(/@/assets/svg/login-bg-dark.svg);
  57. }
  58. .@{ventSpace}-input,
  59. .@{ventSpace}-input-password {
  60. background-color: #232a3b;
  61. }
  62. .@{ventSpace}-btn:not(.@{ventSpace}-btn-link):not(.@{ventSpace}-btn-primary) {
  63. border: 1px solid #4a5569;
  64. }
  65. &-form {
  66. background: transparent !important;
  67. }
  68. .app-iconify {
  69. color: #fff;
  70. }
  71. }
  72. input.fix-auto-fill,
  73. .fix-auto-fill input {
  74. -webkit-text-fill-color: #c9d1d9 !important;
  75. box-shadow: inherit !important;
  76. }
  77. }
  78. @{theme-dark} {
  79. .login-container {
  80. background: #021632;
  81. &::before {
  82. background-image: none;
  83. }
  84. }
  85. }
  86. .login-container {
  87. color: @themify-text-primary;
  88. width: 100vw;
  89. height: 100%;
  90. background: linear-gradient(to bottom, #000c37, #001e63);
  91. padding: 0 !important;
  92. position: relative;
  93. &::before {
  94. content: '';
  95. position: absolute;
  96. width: 100%;
  97. height: 100%;
  98. top: 0px;
  99. left: 0;
  100. background-image: url('/@/assets/images/vent/login/bg.png');
  101. background-size: cover;
  102. }
  103. .login-bg {
  104. position: absolute;
  105. width: 100%;
  106. height: 100%;
  107. top: 0;
  108. left: 0;
  109. background: linear-gradient(to bottom, #000c3766, #001e6366);
  110. }
  111. .top-header {
  112. width: 100%;
  113. display: flex;
  114. flex-direction: column;
  115. justify-content: center;
  116. align-items: center;
  117. position: relative;
  118. // padding-top: 70px;
  119. .top-bg {
  120. width: 100%;
  121. height: 129px;
  122. background-image: url('/@/assets/images/vent/login/top.png');
  123. background-size: 100% auto;
  124. }
  125. .login-icon {
  126. position: relative;
  127. width: 237px;
  128. height: 274px;
  129. top: 10px;
  130. background-image: url('/@/assets/images/vent/login/icon.png');
  131. }
  132. .title {
  133. position: absolute;
  134. top: 78px;
  135. color: rgb(224, 224, 224);
  136. font-size: 30px;
  137. text-align: center;
  138. text-shadow:
  139. 1px 1px 1px #fff,
  140. -1px -1px 1px #000;
  141. }
  142. }
  143. .bottom {
  144. width: 100%;
  145. height: 118px;
  146. position: fixed;
  147. bottom: 0;
  148. left: 0;
  149. background-image: url('/@/assets/images/vent/login/down.png');
  150. background-size: 100% auto;
  151. }
  152. .center {
  153. width: 100%;
  154. height: calc(100% - 540px);
  155. display: flex;
  156. flex-direction: column;
  157. align-items: center;
  158. position: relative;
  159. justify-content: center;
  160. }
  161. }
  162. .@{prefix-cls} {
  163. min-height: 100%;
  164. overflow: hidden;
  165. @media (max-width: @screen-xl) {
  166. background-color: #293146;
  167. .@{prefix-cls}-form {
  168. background-color: #fff;
  169. }
  170. }
  171. &::before {
  172. position: absolute;
  173. top: 0;
  174. left: 0;
  175. width: 100%;
  176. height: 100%;
  177. margin-left: -48%;
  178. // background-image: url(/@/assets/svg/login-bg.svg);
  179. background-position: 100%;
  180. background-repeat: no-repeat;
  181. background-size: auto 100%;
  182. content: '';
  183. @media (max-width: @screen-xl) {
  184. display: none;
  185. }
  186. }
  187. .@{logo-prefix-cls} {
  188. position: absolute;
  189. top: 12px;
  190. height: 30px;
  191. &__title {
  192. font-size: 16px;
  193. color: #fff;
  194. }
  195. img {
  196. width: 32px;
  197. }
  198. }
  199. .container {
  200. .@{logo-prefix-cls} {
  201. display: flex;
  202. width: 60%;
  203. height: 80px;
  204. &__title {
  205. font-size: 24px;
  206. color: #fff;
  207. }
  208. img {
  209. width: 48px;
  210. }
  211. }
  212. }
  213. &-sign-in-way {
  214. .anticon {
  215. font-size: 22px;
  216. color: #888;
  217. cursor: pointer;
  218. &:hover {
  219. color: @primary-color;
  220. }
  221. }
  222. }
  223. input:not([type='checkbox']) {
  224. min-width: 360px;
  225. @media (max-width: @screen-xl) {
  226. min-width: 320px;
  227. }
  228. @media (max-width: @screen-lg) {
  229. min-width: 260px;
  230. }
  231. @media (max-width: @screen-md) {
  232. min-width: 240px;
  233. }
  234. @media (max-width: @screen-sm) {
  235. min-width: 160px;
  236. }
  237. }
  238. .@{countdown-prefix-cls} input {
  239. min-width: unset;
  240. }
  241. .@{ventSpace}-divider-inner-text {
  242. font-size: 12px;
  243. color: @text-color-secondary;
  244. }
  245. }
  246. </style>