diff --git a/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue b/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue index 21a7df0d..90112870 100644 --- a/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue +++ b/Yi.Ai.Vue3/src/components/userPersonalCenter/components/APIKeyManagement.vue @@ -8,10 +8,19 @@ import { isUserVip } from '@/utils/user'; const apiKey = ref(''); const showKey = ref(false); -const loading = ref(false); +const loading = ref(true); const displayedKey = ref(''); const showSuccessDialog = ref(false); - +const svg = ` + + `; const isOpening = ref(false); const confettis = ref([]); const router = useRouter(); @@ -147,13 +156,21 @@ function generateConfetti() { setTimeout(() => confettis.value = [], 2000); } -onMounted(() => { - fetchApiKey(); +onMounted(async () => { + await fetchApiKey(); + loading.value = false; });