카테고리 목록 불러오기 수정
This commit is contained in:
parent
8fcc702d9b
commit
3cb3281a86
@ -69,6 +69,7 @@
|
||||
import DictCard from '@/components/wordDict/DictCard.vue';
|
||||
import DictWrite from '@/components/wordDict/DictWrite.vue';
|
||||
import DictAlphabetFilter from '@/components/wordDict/DictAlphabetFilter.vue';
|
||||
import commonApi from '@/common/commonApi'
|
||||
import { useToastStore } from '@s/toastStore';
|
||||
|
||||
const { appContext } = getCurrentInstance();
|
||||
@ -87,7 +88,7 @@
|
||||
const total = ref(0);
|
||||
|
||||
// 카테고리
|
||||
const cateList = ref([]);
|
||||
const { cateList } = commonApi();
|
||||
const selectedCategory = ref('');
|
||||
|
||||
//선택된 알파벳
|
||||
@ -102,7 +103,6 @@
|
||||
// 데이터 로드
|
||||
onMounted(() => {
|
||||
getwordList();
|
||||
getwordCategory();
|
||||
});
|
||||
|
||||
//용어 목록
|
||||
@ -128,17 +128,7 @@
|
||||
loading.value = false;
|
||||
});
|
||||
};
|
||||
// 카테고리 목록
|
||||
const getwordCategory = () => {
|
||||
axios.get('worddict/getWordCategory')
|
||||
.then(res => {
|
||||
cateList.value = res.data.data;
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('카테고리 로드 오류:', err);
|
||||
error.value = '카테고리 데이터를 가져오는 중 문제가 발생했습니다.';
|
||||
});
|
||||
};
|
||||
|
||||
// 검색
|
||||
const search = (e) => {
|
||||
searchText.value = e.trim();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user