From 0968a616b60c7c540f119e3bd433820313e2bafe Mon Sep 17 00:00:00 2001 From: kimdaae328 Date: Thu, 27 Feb 2025 16:46:49 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B5=EB=AA=85=20=EB=8C=93=EA=B8=80=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/board/BoardView.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/views/board/BoardView.vue b/src/views/board/BoardView.vue index 1911f32..5a6caf8 100644 --- a/src/views/board/BoardView.vue +++ b/src/views/board/BoardView.vue @@ -599,6 +599,8 @@ const submitCommentPassword = async (comment, password) => { return; } + const targetComment = findCommentById(comment.commentId, comments.value); + try { // console.log('서버로 비밀번호 확인 요청') const response = await axios.post(`board/comment/${comment.commentId}/password`, { @@ -612,10 +614,17 @@ const submitCommentPassword = async (comment, password) => { comment.isCommentPassword = false; if (lastCommentClickedButton.value === "edit") { - comment.isEditTextarea = true; - passwordCommentAlert.value = ""; - // handleSubmitEdit(comment, comment.content); + if (targetComment) { + targetComment.isEditTextarea = true; + passwordCommentAlert.value = ""; + + } else { + alert("수정 취소를 실패했습니다."); + } + + // 여기부분이 익명 수정 비밀번호 부분임!!!!! + } else if (lastCommentClickedButton.value === "delete") { passwordCommentAlert.value = "";