I have been working on creating a modal component that allows users to input data and then displays it in another component. For example, the user is prompted to enter their first and last name in a modal component (Modal.vue). Once the user saves this information using a submit method on the modal, it is displayed in another component (InputItem.vue).
Currently, my project consists of several components: CreateEvent.vue, Modal.vue, EventItem.vue, EventsList.vue, and app.vue. I have implemented CRUD functionality successfully without the modal component, but when I try to integrate the modal, I start facing difficulties.
I would appreciate any guidance or assistance you can provide to help me navigate through this challenge!
Modal.vue
<template>
<transition name="modal-fade">
<div class="modal-backdrop">
<div
class="modal"
role="dialog"
aria-labelledby="modalTitle"
aria-describedby="modalDescription"
>
<!--- Modal template code goes here --->
</div>
</div>
</transition>
</template>
<script>
export default {
name: 'modal',
data() {
return {
newTodo: '',
newEmoji: '',
idForTodo: this.todos.length + 1
}
},
methods: {
<!--- Modal methods go here --->
}
}
</script>
CreateEvent.vue
EventItem.vue
Events.vue
app.vue