From 66fb1f204ee77e9ce30cc5938ac629625314d519 Mon Sep 17 00:00:00 2001 From: kimdaae328 Date: Tue, 25 Feb 2025 13:27:57 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=B5=EB=AA=85=EA=B2=8C=EC=8B=9C=EB=AC=BC?= =?UTF-8?q?=EC=9D=BC=EB=95=8C=20=EB=8C=93=EA=B8=80=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/board/BoardCommentArea.vue | 17 ++++-- src/components/board/BoardProfile.vue | 9 ++-- src/views/board/BoardView.vue | 65 ++++++++++++----------- 3 files changed, 52 insertions(+), 39 deletions(-) diff --git a/src/components/board/BoardCommentArea.vue b/src/components/board/BoardCommentArea.vue index 2ed5141..0a95249 100644 --- a/src/components/board/BoardCommentArea.vue +++ b/src/components/board/BoardCommentArea.vue @@ -17,6 +17,7 @@ rows="3" v-model="comment" > + {{ commentAlert }} @@ -42,6 +43,7 @@ id="basic-default-password" class="form-control flex-grow-1" v-model="password" + placeholder="비밀번호 입력" /> {{ passwordAlert }} @@ -74,6 +76,10 @@ const props = defineProps({ passwordAlert: { type: String, default: false + }, + commentAlert: { + type: String, + default: false } }); @@ -87,11 +93,16 @@ function handleCommentSubmit() { emit('submitComment', { comment: comment.value, password: isCheck.value ? password.value : '', + isCheck: isCheck.value }); - - comment.value = ''; - password.value = ''; } +watch(() => props.passwordAlert, () => { + if (!props.passwordAlert) { + comment.value = ''; + password.value = ''; + } +}); + diff --git a/src/components/board/BoardProfile.vue b/src/components/board/BoardProfile.vue index 2c280f5..7e337f0 100644 --- a/src/components/board/BoardProfile.vue +++ b/src/components/board/BoardProfile.vue @@ -21,9 +21,8 @@
- - -