list.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <script lang='ts' setup>
  2. import useLoginAndDownload from '../../useLoginAndDownload'
  3. import { useCommonStore } from '@/stores/modules/common'
  4. const commonStore = useCommonStore()
  5. const defaultName = 'EJET Spark'
  6. const { loginedAccountList } = storeToRefs(commonStore)
  7. const { onSelectAccount } = useLoginAndDownload()
  8. function selectOtherLogin() {
  9. commonStore.setLoginType('choice')
  10. }
  11. </script>
  12. <template>
  13. <div>
  14. <div class="custom-title-font text-24px fw-800 text-#333 mb-10px">
  15. <span class="custom-title-bg03">Sign In</span> to EJET Spark
  16. </div>
  17. <div class="text-14px text-#1A1A1A lh-22px mb-22px">
  18. You alredy have the following EJET Spark accounts, select one to continue.
  19. </div>
  20. <div class="flex flex-col gap-20px">
  21. <div v-for="item, index in loginedAccountList" :key="index" class="flex py-15px px-35px b-rd-10px b-#D8D8D b-1px b-solid cursor-pointer hover:b-#9B6CFF" @click="onSelectAccount(item)">
  22. <!-- 获取首字母 -->
  23. <div class="w-50px h-50px bg-#F2E5F2 text-#9B6CFF fw-800 text-24px flex justify-center b-rd-50% items-center mr-28px">
  24. {{ item.name ? item.name.charAt(0).toUpperCase() : defaultName.charAt(0).toUpperCase() }}
  25. </div>
  26. <div>
  27. <div class="text-18px fw-bold text-#333 custom-title-font">
  28. {{ item.name || defaultName }}
  29. </div>
  30. <div class="text-#9B6CFF mt-8px">
  31. {{ item.email }}
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. <div class="mt-20px text-#333">
  37. Continue with another account. <span class="text-#9B6CFF cursor-pointer hover:underline" @click="selectOtherLogin">Click here⁠.</span>
  38. </div>
  39. </div>
  40. </template>
  41. <style lang='less' scoped>
  42. ::v-deep(.login-input) {
  43. .el-input__wrapper{
  44. border-radius: 10px;
  45. }
  46. }
  47. </style>