1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| <template>
<div>
<div v-for="listFilm in listFilms" :key="listFilm.id">
<p>{{listFilm.id }}</p>
<h1 >{{ listFilm.title }}</h1>
<p>{{ listFilm.auteur}}</p>
</div>
</div>
</template>
<script>
export default {
name:"FaqQuestion",
data(){
return{
listFilms:[
{
id: 1,
title:"film 1",
auteur: "Jean ",
infoFilm:"texte"
},
{
id:2,
title:"2",
auteur: "dupont",
infoFilm:"texte"
},
]
},
beforeMount(){
const url = window.location.href;
this.id = url.split("/").slice(-1)[0];
}
} |
Partager