feat. 이벤트 네비게이션 추가

This commit is contained in:
clkim
2025-11-10 21:11:39 +09:00
parent 65c79eb689
commit 60b306ca90
24 changed files with 647 additions and 422 deletions

View File

@@ -1,39 +1,13 @@
<script setup lang="ts">
import { ref, watch } from 'vue'
interface Props {
isOpen: boolean
contentText: string
}
const props = withDefaults(defineProps<Props>(), {
isOpen: false,
})
const emit = defineEmits(['close'])
const isVisible = ref(false)
watch(
() => props.isOpen,
newVal => {
if (newVal) {
isVisible.value = true
setTimeout(() => {
isVisible.value = false
emit('close')
}, 2000)
}
}
)
const modalStore = useModalStore()
const { toast } = modalStore
</script>
<template>
<Transition name="fade">
<div v-if="isVisible" class="toast-container">
<div v-if="toast.storeIsOpen" class="toast-container">
<p class="toast-text">
{{ contentText }}
{{ toast.storeContentText }}
</p>
</div>
</Transition>