diff --git a/src/components/wordDict/DictWrite.vue b/src/components/wordDict/DictWrite.vue index eccf5a3..985c69d 100644 --- a/src/components/wordDict/DictWrite.vue +++ b/src/components/wordDict/DictWrite.vue @@ -1,39 +1,49 @@ @@ -124,3 +134,15 @@ const saveWord = () => { emit('addWord', wordData); }; + + \ No newline at end of file diff --git a/src/views/wordDict/wordDict.vue b/src/views/wordDict/wordDict.vue index 36a8641..3c494aa 100644 --- a/src/views/wordDict/wordDict.vue +++ b/src/views/wordDict/wordDict.vue @@ -172,7 +172,7 @@ }).then(res => { if(res.data.data == '1'){ toastStore.onToast('카테고리가 추가 등록 되었습니다.', 's'); - const newCategory = { CMNCODNAM: data, CMNCODVAL: newValue.toString() }; // Assuming CMNCODVAL is the same as CMNCODNAM + const newCategory = { CMNCODNAM: data, CMNCODVAL: newValue.toString() }; cateList.value.unshift(newCategory); selectCategory.value = newCategory.CMNCODVAL; } @@ -181,10 +181,6 @@ //용어 등록 const addWord = (wordData) => { - // console.log('단어 추가됨:', wordData.category); // WRDDICCAT - // console.log('단어 추가됨:', wordData.content); // WRDDICCON - // console.log('단어 추가됨:', wordData.title); // WRDDICTTL - axios.post('worddict/insertWord',{ WRDDICCAT : wordData.category, WRDDICTTL : wordData.title, @@ -192,10 +188,8 @@ }).then(res => { if(res.data.data == '1'){ toastStore.onToast('용어가 등록 되었습니다.', 's'); - isWriteVisible.value = false - // const newCategory = { CMNCODNAM: data, CMNCODVAL: newValue.toString() }; - // cateList.value.unshift(newCategory); - // selectCategory.value = newCategory.CMNCODVAL; + isWriteVisible.value = false; + getwordList(); } }) };