@@ -48,6 +48,13 @@ async function getExams() {
pageSize: 1000,
});
dataList.value = res.result || [];
+ if (!userStore.curExam?.id) {
+ if (dataList.value.length == 1) {
+ userStore.setCurExam(dataList.value[0]);
+ } else {
+ open();
+ }
}
getExams();
@@ -108,7 +108,7 @@
</template>
<script setup lang="ts">
-import { ref, watch } from "vue";
+import { ref, watch, onMounted } from "vue";
import {
SwapOutlined,
RightOutlined,