You can create a separate component for each item and handle its modal state in that component. You can use bootstrap, bulma or pure html and css to make modal boxes. Use v-show="modalState"
to hide or show the modal box. Define modalState
in your child component:
data() { return { modalState: false } }
Your final structure:
<div class="biblio__all"> <a v-for="i in items" v-bind:key="i.id" class="biblio__item"> <!-- 擁有模態(tài)框和主要項(xiàng)目代碼的組件 --> <subitem :item="i" /> </a> </div>