수정 토글 닫기도 되게 수정
This commit is contained in:
parent
003e9da85e
commit
ef1101d9ee
@ -472,7 +472,7 @@
|
||||
const editComment = comment => {
|
||||
password.value = '';
|
||||
passwordCommentAlert.value = '';
|
||||
currentPasswordCommentId.value = null;
|
||||
//currentPasswordCommentId.value = null;
|
||||
|
||||
const targetComment = findCommentById(comment.commentId, comments.value);
|
||||
|
||||
@ -498,6 +498,7 @@
|
||||
} else if (isAnonymous) {
|
||||
if (currentPasswordCommentId.value === comment.commentId) {
|
||||
// 이미 비밀번호 입력 중이면 유지
|
||||
toggleCommentPassword(comment, 'edit');
|
||||
return;
|
||||
} else {
|
||||
// 다른 모든 댓글의 수정창 닫기
|
||||
@ -540,6 +541,9 @@
|
||||
|
||||
// 익명 댓글 비밀번호 창 토글
|
||||
const toggleCommentPassword = (comment, button) => {
|
||||
console.log('comment.commentId: ', comment.commentId);
|
||||
console.log('currentPasswordCommentId.value: ', currentPasswordCommentId.value);
|
||||
console.log('lastCommentClickedButton.value : ', lastCommentClickedButton.value);
|
||||
if (lastCommentClickedButton.value === button && currentPasswordCommentId.value === comment.commentId) {
|
||||
currentPasswordCommentId.value = null; // 비밀번호 창 닫기
|
||||
password.value = '';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user