경고 수정중
This commit is contained in:
parent
2cc280717d
commit
63f8f167eb
@ -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>
|
||||
|
||||
@ -73,11 +73,11 @@ const props = defineProps({
|
||||
},
|
||||
passwordAlert: {
|
||||
type: String,
|
||||
default: false
|
||||
default: ''
|
||||
},
|
||||
commentAlert: {
|
||||
type: String,
|
||||
default: false
|
||||
default: ''
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -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); // 댓글
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -82,7 +82,7 @@ const props = defineProps({
|
||||
isCommentProfile: Boolean, // 현재 컴포넌트가 댓글용인지 여부
|
||||
date: {
|
||||
type: String,
|
||||
required: true,
|
||||
required: '',
|
||||
},
|
||||
views: {
|
||||
type: Number,
|
||||
|
||||
@ -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: {
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user