完成答题逻辑

This commit is contained in:
Andy Leong
2024-01-04 17:31:22 +08:00
parent 7905cb5fb7
commit 313af3437b
7 changed files with 452 additions and 44 deletions

View File

@@ -1,15 +1,17 @@
<template>
<div class="home">
<Loading v-if="showLoad" @LoadPage="loadFn"></Loading>
<Index v-if="showIndex" @IndexPage="indexFn"></Index>
<Question v-if="showQuestion" @QuestionPage="questionFn"></Question>
<Loading v-if="showLoad" @LoadPage="loadFn"></Loading>
</div>
</template>
<script setup>
import Loading from "@/components/Loading.vue";
import Index from "@/components/Index.vue";
import Loading from "@/components/Loading";
import Index from "@/components/Index";
import Question from "@/components/Question";
const showLoad = ref(true);
const showLoad = ref(false);
const loadFn = (item) => {
if (item.action == "hide") {
showLoad.value = false;
@@ -24,6 +26,14 @@ const indexFn = (item) => {
}
};
const showQuestion = ref(true);
const questionFn = (item) => {
if (item.action == "hide") {
showQuestion.value = false;
}
};
onMounted(() => { });
</script>