P粉0630399902023-08-29 12:55:47
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"> <!-- 拥有模态框和主要项目代码的组件 --> <subitem :item="i" /> </a> </div>