경고 수정중

This commit is contained in:
kimdaae328 2025-02-28 10:57:25 +09:00
parent 2cc280717d
commit 63f8f167eb
6 changed files with 16 additions and 16 deletions

View File

@ -59,7 +59,7 @@
:isCommentProfile="true"
:isCommentAuthor="child.isCommentAuthor"
:isCommentPassword="isCommentPassword"
@editClick="handleReplyEditClick "
@editClick="handleReplyEditClick"
@deleteClick="$emit('deleteClick', child)"
@submitEdit="(comment, editedContent) => $emit('submitEdit', comment, editedContent)"
@cancelEdit="$emit('cancelEdit', child)"
@ -110,7 +110,7 @@ const props = defineProps({
},
passwordCommentAlert: {
type: String,
default: false
default: ''
}
});
@ -164,8 +164,8 @@ const handleEditClick = () => {
emit('editClick', props.comment);
}
const handleReplyEditClick = (event) => {
emit('editClick', event);
const handleReplyEditClick = (comment) => {
emit('editClick', comment);
}
</script>

View File

@ -73,11 +73,11 @@ const props = defineProps({
},
passwordAlert: {
type: String,
default: false
default: ''
},
commentAlert: {
type: String,
default: false
default: ''
}
});

View File

@ -11,12 +11,11 @@
:isCommentAuthor="comment.isCommentAuthor"
:isEditTextarea="comment.isEditTextarea"
:isCommentPassword="isCommentPassword"
:passwordCommentAlert="passwordCommentAlert"
:passwordCommentAlert="passwordCommentAlert || ''"
@editClick="handleEditClick"
@deleteClick="handleDeleteClick"
@submitPassword="submitPassword"
@submitComment="submitComment"
@commentDeleted="handleCommentDeleted"
@submitEdit="handleSubmitEdit"
@cancelEdit="handleCancelEdit"
@updateReaction="(reactionData) => handleUpdateReaction(reactionData, comment.commentId, comment.boardId)"
@ -53,11 +52,11 @@ const props = defineProps({
},
passwordCommentAlert: {
type: String,
default: false
default: ''
}
});
const emit = defineEmits(['submitComment', 'updateReaction', 'editClick', 'deleteClick', 'submitPassword', 'clearPassword']);
const emit = defineEmits(['submitComment', 'updateReaction', 'editClick', 'deleteClick', 'submitPassword', 'clearPassword','submitEdit']);
const submitComment = (replyData) => {
emit('submitComment', replyData);
@ -79,9 +78,9 @@ const submitPassword = (comment, password) => {
const handleEditClick = (comment) => {
if (comment.parentId) {
emit('deleteClick', comment); //
emit('editClick', comment); //
} else {
emit('deleteClick', comment); //
emit('editClick', comment); //
}
};

View File

@ -82,7 +82,7 @@ const props = defineProps({
isCommentProfile: Boolean, //
date: {
type: String,
required: true,
required: '',
},
views: {
type: Number,

View File

@ -13,7 +13,7 @@ import { ref, computed } from 'vue';
const props = defineProps({
comment: {
type: Object,
required: true,
default: () => ({}),
},
likeClicked : {
type : Boolean,
@ -36,7 +36,7 @@ const props = defineProps({
required: true,
},
commentId: {
type: Number,
type: [Number, null],
default: null,
},
likeCount: {

View File

@ -175,6 +175,7 @@ const passwordAlert = ref("");
const passwordCommentAlert = ref("");
const isPassword = ref(false);
const isCommentPassword = ref(false);
const currentPasswordCommentId = ref(null);
const lastClickedButton = ref("");
const lastCommentClickedButton = ref("");
const isEditTextarea = ref(false);
@ -487,6 +488,7 @@ const deleteComment = async (comment) => {
//
const toggleCommentPassword = (comment, button) => {
console.log(comment.commentId)
if (lastCommentClickedButton.value === button && isCommentPassword.value === comment.commentId) {
isCommentPassword.value = false; //
} else {
@ -637,7 +639,6 @@ const deleteReplyComment = async (comment) => {
//
const handleSubmitEdit = async (comment, editedContent) => {
console.log('asdasdasdasd')
try {
const response = await axios.put(`board/comment/${comment.commentId}`, {
LOCCMTSEQ: comment.commentId,