삭제시 댓글 비밀번호 입력창 비활성화
This commit is contained in:
parent
a3ea106265
commit
5b84ef9350
@ -370,7 +370,7 @@
|
|||||||
// 댓글 작성
|
// 댓글 작성
|
||||||
const handleCommentSubmit = async data => {
|
const handleCommentSubmit = async data => {
|
||||||
closeAllEditTextareas();
|
closeAllEditTextareas();
|
||||||
closeAllPasswordareas();
|
closeAllPasswordAreas();
|
||||||
togglePassword('close');
|
togglePassword('close');
|
||||||
if (!data) {
|
if (!data) {
|
||||||
return;
|
return;
|
||||||
@ -528,7 +528,8 @@
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeAllPasswordareas = () => {
|
// 모든 댓글의 비밀번호 창 닫기
|
||||||
|
const closeAllPasswordAreas = () => {
|
||||||
currentPasswordCommentId.value = null; // 비밀번호 창 닫기
|
currentPasswordCommentId.value = null; // 비밀번호 창 닫기
|
||||||
password.value = '';
|
password.value = '';
|
||||||
passwordCommentAlert.value = '';
|
passwordCommentAlert.value = '';
|
||||||
@ -692,7 +693,6 @@
|
|||||||
if (!confirm('정말 이 댓글을 삭제하시겠습니까?')) return;
|
if (!confirm('정말 이 댓글을 삭제하시겠습니까?')) return;
|
||||||
|
|
||||||
const targetComment = findCommentById(comment.commentId, comments.value);
|
const targetComment = findCommentById(comment.commentId, comments.value);
|
||||||
console.log(comment.parentId, comment.commentId)
|
|
||||||
try {
|
try {
|
||||||
const response = await axios.delete(`board/comment/${comment.commentId}`, {
|
const response = await axios.delete(`board/comment/${comment.commentId}`, {
|
||||||
params: { LOCCMTSEQ: comment.commentId, LOCCMTPNT: comment.parentId },
|
params: { LOCCMTSEQ: comment.commentId, LOCCMTPNT: comment.parentId },
|
||||||
@ -700,6 +700,7 @@
|
|||||||
|
|
||||||
if (response.data.code === 200) {
|
if (response.data.code === 200) {
|
||||||
await fetchComments();
|
await fetchComments();
|
||||||
|
closeAllPasswordAreas();
|
||||||
|
|
||||||
if (targetComment) {
|
if (targetComment) {
|
||||||
// console.log('타겟',targetComment)
|
// console.log('타겟',targetComment)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user