From 7fd115ddc73d4bc70d7417bcb9de39720b6dbbdd Mon Sep 17 00:00:00 2001 From: nevermoregb Date: Fri, 28 Mar 2025 13:59:38 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=93=EA=B8=80=20=EC=88=98=EC=A0=95?= =?UTF-8?q?=EC=82=AC=ED=95=AD=20=EC=97=86=EC=9C=BC=EB=A9=B4=20submit=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20disabled=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/board/BoardComment.vue | 9 ++++++++- src/components/button/SaveBtn.vue | 25 ++++++++++--------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/components/board/BoardComment.vue b/src/components/board/BoardComment.vue index fa13318..200704f 100644 --- a/src/components/board/BoardComment.vue +++ b/src/components/board/BoardComment.vue @@ -38,7 +38,7 @@ {{ editCommentAlert }}
- +
@@ -142,6 +142,8 @@ }; const localEditedContent = ref(props.comment.content); + const isModifyContent = ref(props.comment.content); + const disabled = ref(false); // 댓글 입력 창 토글 const isComment = ref(false); @@ -182,6 +184,11 @@ watch( () => localEditedContent.value, newVal => { + if (JSON.stringify(isModifyContent.value) == JSON.stringify(newVal)) { + disabled.value = false; + return; + } + disabled.value = true; emit('inputDetector'); }, ); diff --git a/src/components/button/SaveBtn.vue b/src/components/button/SaveBtn.vue index 7c8068a..51fcd48 100644 --- a/src/components/button/SaveBtn.vue +++ b/src/components/button/SaveBtn.vue @@ -1,23 +1,18 @@