我感兴趣的是在nuxt项目使用vuetify扩展面板组件。 我在看https://vuetifyjs.com/en/components/expansion-panels#examples 。 该exampleas都显示出基于代码看起来像每个子面板相同的文字和标题:
<v-app id="inspire">
<div>
<div class="text-xs-center mb-3">{{ panel }}</div>
<v-expansion-panel
v-model="panel"
expand
>
<v-expansion-panel-content
v-for="(item, i) in 5"
:key="i"
>
<div slot="header">Item</div>
<v-card>
<v-card-text class="grey lighten-3">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</v-card-text>
</v-card>
</v-expansion-panel-content>
</v-expansion-panel>
</div>
new Vue({ el: '#app', })
<script src="https://cdn.jsdelivr.net/npm/babel-polyfill/dist/polyfill.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> <script src="https://cdn.jsdelivr.net/npm/vuetify@1.4.0/dist/vuetify.min.js"></script> <link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900|Material+Icons"> <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/vuetify@1.4.0/dist/vuetify.min.css"> <div id="app"> <v-app id="inspire"> <v-expansion-panel> <v-expansion-panel-content v-for="(item,i) in 5" :key="i"> <div slot="header">Item</div> <v-card> <v-card-text>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</v-card-text> </v-card> </v-expansion-panel-content> </v-expansion-panel> </v-app> </div>
我如何获得每个子面板有一个不同的标题和文字?