로딩 수정

This commit is contained in:
dyhj625 2025-03-17 15:10:07 +09:00
parent ce1011b96f
commit cc8e347aa9

View File

@ -26,8 +26,6 @@
</div> </div>
<!-- 용어 리스트 --> <!-- 용어 리스트 -->
<div> <div>
<!-- 로딩 중일 -->
<LoadingSpinner v-if="loading"/>
<!-- 에러 메시지 --> <!-- 에러 메시지 -->
<div v-if="error" class="error">{{ error }}</div> <div v-if="error" class="error">{{ error }}</div>
<!-- 단어 목록 --> <!-- 단어 목록 -->
@ -78,7 +76,6 @@
const toastStore = useToastStore(); const toastStore = useToastStore();
// //
const loading = ref(false);
const error = ref(''); const error = ref('');
// //
@ -134,12 +131,10 @@
wordList.value = res.data.data.data; wordList.value = res.data.data.data;
// //
total.value = res.data.data.total; total.value = res.data.data.total;
loading.value = false;
}) })
.catch(err => { .catch(err => {
console.error('데이터 로드 오류:', err); console.error('데이터 로드 오류:', err);
error.value = '데이터를 가져오는 중 문제가 발생했습니다.'; error.value = '데이터를 가져오는 중 문제가 발생했습니다.';
loading.value = false;
}); });
}; };
// //