From fe9fba3904b9cbebacd5e8eab6cab953fad86af5 Mon Sep 17 00:00:00 2001 From: nevermoregb Date: Tue, 25 Mar 2025 12:23:13 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8=20maxlengt?= =?UTF-8?q?h=204=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/board/BoardComment.vue | 3 ++- src/components/board/BoardCommentArea.vue | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/board/BoardComment.vue b/src/components/board/BoardComment.vue index 9147773..4a1466b 100644 --- a/src/components/board/BoardComment.vue +++ b/src/components/board/BoardComment.vue @@ -24,6 +24,7 @@ class="form-control" :value="password" autocomplete="new-password" + maxlength="4" placeholder="비밀번호 입력" @input="filterInput" /> @@ -119,7 +120,7 @@ }); const displayName = computed(() => { - return props.nickname? props.nickname: props.comment.author; + return props.nickname ? props.nickname : props.comment.author; }); // emits 정의 diff --git a/src/components/board/BoardCommentArea.vue b/src/components/board/BoardCommentArea.vue index 84783bd..57f65ec 100644 --- a/src/components/board/BoardCommentArea.vue +++ b/src/components/board/BoardCommentArea.vue @@ -43,7 +43,7 @@ @input="clearAlert('nickname')" /> -
+
{{ nicknameAlert }}
@@ -57,7 +57,11 @@ autocomplete="new-password" v-model="password" placeholder="비밀번호" - @input="clearAlert('password')" + maxlength="4" + @input=" + password = password.replace(/\s/g, ''); + clearAlert('password'); + " />
@@ -145,6 +149,7 @@ if (!$common.isNotEmpty(password.value)) { passwordAlert2.value = '비밀번호를 입력해주세요.'; + password.value = ''; isValid = false; } else { passwordAlert2.value = '';