You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

28 lines
997 B

2 years ago
<template>
<div v-if="getShow">
2 years ago
<LoginFormTitle class="enter-x" />
<div class="enter-x min-w-64 min-h-64">
<QrCode :value="qrCodeUrl" class="enter-x flex justify-center xl:justify-start" :width="280" />
<Divider class="enter-x">{{ t('sys.login.scanSign') }}</Divider>
<Button size="large" block class="mt-4 enter-x" @click="handleBackLogin">
{{ t('sys.login.backSignIn') }}
</Button>
</div>
</div>
2 years ago
</template>
<script lang="ts" setup>
import { computed, unref } from 'vue'
import LoginFormTitle from './LoginFormTitle.vue'
import { Button, Divider } from 'ant-design-vue'
import { QrCode } from '@/components/Qrcode'
import { useI18n } from '@/hooks/web/useI18n'
import { useLoginState, LoginStateEnum } from './useLogin'
2 years ago
const qrCodeUrl = 'https://vben.xingyuv.com/login'
2 years ago
const { t } = useI18n()
const { handleBackLogin, getLoginState } = useLoginState()
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.QR_CODE)
</script>