From 36888c3e30a6902d0beaa54f9825e3c8b706523f Mon Sep 17 00:00:00 2001 From: khj0414 Date: Thu, 3 Apr 2025 16:12:57 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=ED=88=AC=ED=91=9C=ED=95=98=EA=B8=B0=20?= =?UTF-8?q?=EB=AA=A8=EB=8B=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/main/MainVote.vue | 108 +++++++++++++++++++++++++++++-- 1 file changed, 101 insertions(+), 7 deletions(-) diff --git a/src/components/main/MainVote.vue b/src/components/main/MainVote.vue index 7d0a135..4f9101f 100644 --- a/src/components/main/MainVote.vue +++ b/src/components/main/MainVote.vue @@ -6,9 +6,9 @@
투표진행
-
+
    -
  • +
  • {{ item.localVote.formatted_LOCVOTRDT }}
    @@ -23,16 +23,18 @@ @error="setDefaultImage" />
    -
    + +
    {{ truncateTitle(item.localVote.LOCVOTTTL) }}
    - + {{ getDaysAgo(item.localVote.formatted_LOCVOTEDT) }} ({{item.localVote.total_voted}}/{{ item.localVote.total_votable }})
+
@@ -50,12 +52,54 @@ + + + + + + + + + From 7e0ae7063dc4dc46d766f4d11ef2af692f631600 Mon Sep 17 00:00:00 2001 From: nevermoregb Date: Thu, 3 Apr 2025 22:17:30 +0900 Subject: [PATCH 3/4] =?UTF-8?q?boardview=20=EC=97=90=EC=84=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95,=20=EC=82=AD=EC=A0=9C=EC=8B=9C=20=EB=B2=84=ED=8A=BC?= =?UTF-8?q?=20=ED=81=B4=EB=A6=AD=20=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/board/BoardComment.vue | 31 +++++ src/components/board/BoardCommentList.vue | 6 +- src/components/board/BoardProfile.vue | 12 +- src/components/button/DeleteBtn.vue | 17 +-- src/components/button/EditBtn.vue | 14 ++- src/views/board/BoardView.vue | 144 ++++++++++++++++------ 6 files changed, 172 insertions(+), 52 deletions(-) diff --git a/src/components/board/BoardComment.vue b/src/components/board/BoardComment.vue index 200704f..940c6bc 100644 --- a/src/components/board/BoardComment.vue +++ b/src/components/board/BoardComment.vue @@ -12,6 +12,8 @@ :isLike="!isLike" :isCommentPassword="isCommentPassword" :isCommentProfile="true" + :is-edit-pushed="isEditPushed" + :is-delete-pushed="isDeletePushed" @editClick="handleEditClick" @deleteClick="$emit('deleteClick', comment)" @updateReaction="handleUpdateReaction" @@ -116,9 +118,20 @@ password: { type: String, }, + // isEditPushed: { + // type: Boolean, + // required: false, + // }, + // isDeletePushed: { + // type: Boolean, + // required: false, + // }, editCommentAlert: String, }); + const isEditPushed = ref(false); + const isDeletePushed = ref(false); + const displayName = computed(() => { return props.nickname ? props.nickname : props.comment.author; }); @@ -171,6 +184,24 @@ emit('submitPassword', props.comment, props.password); }; + const handleInject = inject('isBtnPushed'); + + // 수정, 삭제 버튼 활성화 상태값 + watch( + () => handleInject.value, + (newValue, oldValue) => { + if (newValue) { + if (newValue.target == props.comment.commentId) { + isEditPushed.value = newValue.isEditPushed; + isDeletePushed.value = newValue.isDeletePushed; + } else { + isEditPushed.value = false; + isDeletePushed.value = false; + } + } + }, + ); + watch( () => props.comment.isEditTextarea, newVal => { diff --git a/src/components/board/BoardCommentList.vue b/src/components/board/BoardCommentList.vue index 49ec969..0181b80 100644 --- a/src/components/board/BoardCommentList.vue +++ b/src/components/board/BoardCommentList.vue @@ -13,6 +13,8 @@ :currentPasswordCommentId="currentPasswordCommentId" :password="password" :editCommentAlert="editCommentAlert[comment.commentId]" + :is-edit-pushed="comment.isEditPushed" + :is-delete-pushed="comment.isDeletePushed" @editClick="handleEditClick" @deleteClick="handleDeleteClick" @submitPassword="submitPassword" @@ -40,6 +42,8 @@ :passwordCommentAlert="passwordCommentAlert" :password="password" :editCommentAlert="editCommentAlert[child.commentId]" + :is-edit-pushed="child.isEditPushed" + :is-delete-pushed="child.isDeletePushed" @editClick="handleReplyEditClick" @deleteClick="$emit('deleteClick', child)" @submitEdit="(comment, editedContent) => $emit('submitEdit', comment, editedContent, child.commentId)" @@ -59,7 +63,7 @@ diff --git a/src/components/button/EditBtn.vue b/src/components/button/EditBtn.vue index 5058a97..c340e88 100644 --- a/src/components/button/EditBtn.vue +++ b/src/components/button/EditBtn.vue @@ -1,10 +1,10 @@ diff --git a/src/components/voteboard/voteCompleteUserList.vue b/src/components/voteboard/voteCompleteUserList.vue index d754513..e004283 100644 --- a/src/components/voteboard/voteCompleteUserList.vue +++ b/src/components/voteboard/voteCompleteUserList.vue @@ -3,7 +3,7 @@
  • -
      +
    diff --git a/src/components/voteboard/voteCompleteUserListCard.vue b/src/components/voteboard/voteCompleteUserListCard.vue index 465e416..336c40a 100644 --- a/src/components/voteboard/voteCompleteUserListCard.vue +++ b/src/components/voteboard/voteCompleteUserListCard.vue @@ -9,7 +9,7 @@ user diff --git a/src/components/voteboard/voteInCompleteUserList.vue b/src/components/voteboard/voteInCompleteUserList.vue index cd41205..8650248 100644 --- a/src/components/voteboard/voteInCompleteUserList.vue +++ b/src/components/voteboard/voteInCompleteUserList.vue @@ -3,7 +3,7 @@
    • -
        +
      diff --git a/src/components/voteboard/voteInCompleteUserListCard.vue b/src/components/voteboard/voteInCompleteUserListCard.vue index 465e416..4ec6182 100644 --- a/src/components/voteboard/voteInCompleteUserListCard.vue +++ b/src/components/voteboard/voteInCompleteUserListCard.vue @@ -9,7 +9,7 @@ user diff --git a/src/components/voteboard/voteUserList.vue b/src/components/voteboard/voteUserList.vue index d930c0a..97d1d8b 100644 --- a/src/components/voteboard/voteUserList.vue +++ b/src/components/voteboard/voteUserList.vue @@ -2,7 +2,7 @@
      - +
      - +