From 8fd19938ba3a6eecf56552f6ca0fcd4edae8f8e4 Mon Sep 17 00:00:00 2001 From: Dang Date: Mon, 10 Feb 2025 16:04:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9A=A9=EC=96=B4=EC=A7=91=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/wordDict/DictWrite.vue | 78 +++++++++++++++++---------- src/views/wordDict/wordDict.vue | 12 ++--- 2 files changed, 53 insertions(+), 37 deletions(-) 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(); } }) };