3737 ]" >
3838 <div
3939 v-if =" history.details.commentFileDetails?.nickName === info.nickname"
40+ ref =" btnRef"
4041 class =" relative cursor-pointer" >
4142 <CommonIcons
4243 :name =" menuDotIcon"
4546 v-if =" isClicked"
4647 @click =" handleModal"
4748 :class =" [
48- 'absolute shadow-custom bottom-0 w-20 h-[27px] rounded flex items-center justify-center text-xs text-red-1 bg-white hover:bg-background-1 ',
49+ 'absolute shadow-custom bottom-0 w-20 h-[27px] rounded flex items-center justify-center text-xs text-red-1 bg-white hover:bg-background-2 ',
4950 isRequestor ? 'left-6' : 'right-6'
5051 ]" >
5152 삭제
@@ -79,6 +80,7 @@ import { computed, defineProps, ref } from 'vue'
7980import CommonIcons from ' ../common/CommonIcons.vue'
8081import ImageContainer from ' ../common/ImageContainer.vue'
8182import ModalView from ' ../common/ModalView.vue'
83+ import { useOutsideClick } from ' @/hooks/useOutsideClick'
8284
8385const { history, requestorName, taskId } = defineProps <TaskDetailHistoryChatProps >()
8486
@@ -103,11 +105,16 @@ const closeModal = () => {
103105 isClicked .value = ! isClicked .value
104106 isModalOpen .value = false
105107}
108+ const closeMenuDot = () => {
109+ isClicked .value = false
110+ }
106111const deleteCommentFile = async () => {
107112 isClicked .value = ! isClicked .value
108113 if (history .details .commentFileDetails ?.commentId !== undefined ) {
109114 await deleteComment (history .details .commentFileDetails ?.commentId )
110115 }
111116 queryClient .invalidateQueries ({ queryKey: [' historyData' , taskId ] })
112117}
118+
119+ const { htmlRef : btnRef } = useOutsideClick (() => closeMenuDot ())
113120 </script >
0 commit comments