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 @@
- - -