| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- <!-- eslint-disable vue/multi-word-component-names -->
- <template>
- <!-- <AdaptiveContainer :options="{ width: 1920, height: 1080 }" style="overflow-y: hidden"> -->
- <div class="login-container" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%">
- <div class="login-bg"></div>
- <span class="-enter-x xl:hidden">
- <AppLogo :alwaysShowTitle="true" />
- </span>
- <div class="top-header">
- <div class="top-bg"></div>
- <div class="login-icon"></div>
- <div class="title">{{ title }}</div>
- </div>
- <div class="flex center">
- <LoginForm />
- </div>
- <div class="bottom"> </div>
- </div>
- <!-- </AdaptiveContainer> -->
- </template>
- <script lang="ts" setup>
- import { computed } from 'vue';
- import { AppLogo } from '/@/components/Application';
- import LoginForm from './LoginForm.vue';
- import { useGlobSetting } from '/@/hooks/setting';
- // import { useI18n } from '/@/hooks/web/useI18n';
- // import { useDesign } from '/@/hooks/web/useDesign';
- // import { useLocaleStore } from '/@/store/modules/locale';
- import { useLoginState } from './useLogin';
- // import AdaptiveContainer from '/@/components/Container/src/Adaptive.vue';
- defineProps({
- sessionTimeout: {
- type: Boolean,
- },
- });
- const globSetting = useGlobSetting();
- // const { prefixCls } = useDesign('login');
- // const { t } = useI18n();
- // const localeStore = useLocaleStore();
- // const showLocale = localeStore.getShowPicker;
- const title = computed(() => globSetting?.title ?? '');
- const { handleBackLogin } = useLoginState();
- handleBackLogin();
- </script>
- <style lang="less" scoped>
- @import '/@/design/theme.less';
- @prefix-cls: ~'@{namespace}-login';
- @logo-prefix-cls: ~'@{namespace}-app-logo';
- @countdown-prefix-cls: ~'@{namespace}-countdown-input';
- @dark-bg: #293146;
- @ventSpace: zxm;
- html[data-theme='dark'] {
- .@{prefix-cls} {
- background-color: @dark-bg;
- &::before {
- background-image: url(/@/assets/svg/login-bg-dark.svg);
- }
- .@{ventSpace}-input,
- .@{ventSpace}-input-password {
- background-color: #232a3b;
- }
- .@{ventSpace}-btn:not(.@{ventSpace}-btn-link):not(.@{ventSpace}-btn-primary) {
- border: 1px solid #4a5569;
- }
- &-form {
- background: transparent !important;
- }
- .app-iconify {
- color: #fff;
- }
- }
- input.fix-auto-fill,
- .fix-auto-fill input {
- -webkit-text-fill-color: #c9d1d9 !important;
- box-shadow: inherit !important;
- }
- }
- // 绿色主题特化的变量
- @{theme-green} {
- .login-container {
- --image-top: url('/@/assets/images/themify/green/vent/login/top.png');
- --image-icon: url('/@/assets/images/themify/green/vent/login/icon.png');
- --image-down: url('/@/assets/images/themify/green/vent/login/down.png');
- --image-bg: none;
- --container-bg: #181B24;
- }
- .login-icon {
- width: 325px !important;
- background-size: 100% 100%;
- }
- }
- // 深蓝色主题特化的变量
- @{theme-deepblue} {
- .login-container {
- --image-top: url('/@/assets/images/themify/deepblue/vent/login/top.png');
- --image-icon: url('/@/assets/images/themify/deepblue/vent/login/icon.png');
- --image-down: url('/@/assets/images/themify/deepblue/vent/login/down.png');
- --image-bg: none;
- --container-bg: #021632;
- }
- }
- .login-container {
- // 需要主题化的变量放在上面
- --image-top: url('/@/assets/images/vent/login/top.png');
- --image-icon: url('/@/assets/images/vent/login/icon.png');
- --image-down: url('/@/assets/images/vent/login/down.png');
- --image-bg: url('/@/assets/images/vent/login/bg.png');
- --container-bg: linear-gradient(to bottom, #000c37, #001e63);
- // 下面是不需要主题化的变量,例如单色图标、中性颜色等
- --login-bg: linear-gradient(to bottom, #000c3766, #001e6366);
- color: @vent-text-base;
- width: 100vw;
- height: 100%;
- background: var(--container-bg);
- padding: 0 !important;
- position: relative;
- &::before {
- content: '';
- position: absolute;
- width: 100%;
- height: 100%;
- top: 0px;
- left: 0;
- background-image: var(--image-bg);
- background-size: cover;
- }
- .login-bg {
- position: absolute;
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- background: var(--login-bg);
- }
- .top-header {
- width: 100%;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- position: relative;
- // padding-top: 70px;
- .top-bg {
- width: 100%;
- height: 129px;
- background-image: var(--image-top);
- background-size: 100% auto;
- }
- .login-icon {
- position: relative;
- width: 237px;
- height: 274px;
- top: 10px;
- background-image: var(--image-icon);
- }
- .title {
- position: absolute;
- top: 78px;
- color: rgb(224, 224, 224);
- font-size: 30px;
- text-align: center;
- text-shadow:
- 1px 1px 1px #fff,
- -1px -1px 1px #000;
- }
- }
- .bottom {
- width: 100%;
- height: 118px;
- position: fixed;
- bottom: 0;
- left: 0;
- background-image: var(--image-down);
- background-size: 100% auto;
- }
- .center {
- width: 100%;
- height: calc(100% - 540px);
- display: flex;
- flex-direction: column;
- align-items: center;
- position: relative;
- justify-content: center;
- }
- }
- .@{prefix-cls} {
- min-height: 100%;
- overflow: hidden;
- @media (max-width: @screen-xl) {
- background-color: #293146;
- .@{prefix-cls}-form {
- background-color: #fff;
- }
- }
- &::before {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- margin-left: -48%;
- // background-image: url(/@/assets/svg/login-bg.svg);
- background-position: 100%;
- background-repeat: no-repeat;
- background-size: auto 100%;
- content: '';
- @media (max-width: @screen-xl) {
- display: none;
- }
- }
- .@{logo-prefix-cls} {
- position: absolute;
- top: 12px;
- height: 30px;
- &__title {
- font-size: 16px;
- color: #fff;
- }
- img {
- width: 32px;
- }
- }
- .container {
- .@{logo-prefix-cls} {
- display: flex;
- width: 60%;
- height: 80px;
- &__title {
- font-size: 24px;
- color: #fff;
- }
- img {
- width: 48px;
- }
- }
- }
- &-sign-in-way {
- .anticon {
- font-size: 22px;
- color: #888;
- cursor: pointer;
- &:hover {
- color: @primary-color;
- }
- }
- }
- input:not([type='checkbox']) {
- min-width: 360px;
- @media (max-width: @screen-xl) {
- min-width: 320px;
- }
- @media (max-width: @screen-lg) {
- min-width: 260px;
- }
- @media (max-width: @screen-md) {
- min-width: 240px;
- }
- @media (max-width: @screen-sm) {
- min-width: 160px;
- }
- }
- .@{countdown-prefix-cls} input {
- min-width: unset;
- }
- .@{ventSpace}-divider-inner-text {
- font-size: 12px;
- color: @text-color-secondary;
- }
- }
- </style>
|