QrCodeForm.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. <script setup lang="ts">
  2. import { computed, unref } from 'vue'
  3. import { useI18n } from '@/hooks/web/useI18n'
  4. import { useLoginState, LoginStateEnum } from './useLogin'
  5. import LoginFormTitle from './LoginFormTitle.vue'
  6. import logoImg from '@/assets/imgs/logo.png'
  7. const { t } = useI18n()
  8. const { handleBackLogin, getLoginState } = useLoginState()
  9. const getShow = computed(() => unref(getLoginState) === LoginStateEnum.QR_CODE)
  10. </script>
  11. <template>
  12. <el-row v-show="getShow" style="maring-left: -10px; maring-right: -10px">
  13. <el-col :span="24" style="padding-left: 10px; padding-right: 10px">
  14. <LoginFormTitle style="width: 100%" />
  15. </el-col>
  16. <el-col :span="24" style="padding-left: 10px; padding-right: 10px">
  17. <el-card shadow="hover" class="mb-10px text-center">
  18. <Qrcode :logo="logoImg" />
  19. </el-card>
  20. </el-col>
  21. <el-divider class="enter-x">{{ t('login.qrcode') }}</el-divider>
  22. <el-col :span="24" style="padding-left: 10px; padding-right: 10px">
  23. <div class="w-[100%] mt-15px">
  24. <el-button class="w-[100%]" @click="handleBackLogin">
  25. {{ t('sys.login.backSignIn') }}
  26. </el-button>
  27. </div>
  28. </el-col>
  29. </el-row>
  30. </template>