Merged
Conversation
Closed
1 task
Minkyu0424
approved these changes
Feb 14, 2025
Contributor
There was a problem hiding this comment.
확인했습니다!
@BaekJiyeon02 Modal이 여러 개인 경우 저희 팀은 현재 다음과 같은 방식을 사용중인 거 같아요
A모달의 상태, B모달 등 여러 모달의 열리고 닫히고 상태를 각각 관리하는 방식의 경우
const isAOpen = ref(false)
const isBopen = ref(false)
하나의 객체에 모달의 상태를 정의해 관리하는 방식
const isModalVisible = ref({ reject: false, fail: false, success: false })
하나의 모달 상태로 관리하되, 모달의 상태를 boolean이 아닌 string으로 관리
const isModalOpen = ref('')
isModalOpen.value='A'
다양한 방식으로 쓰이곤 하는데 프로젝트가 끝나가지만..
다음 프로젝트에 모달을 쓰게된다면 어떤 방식이 좋을지 생각해봐도 좋을 거 같아요!
저도 아직 고민이되어서 그때 그때 다른거 같아요 😂
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 티켓 넘버
📝작업 내용
🏞️스크린샷 (선택)
💬리뷰 요구사항(선택)