24 lines
546 B
Plaintext
24 lines
546 B
Plaintext
<kind>
|
|
<select onchange="{ select }" name="genre-names" value="1">
|
|
<option each={genre in this.state.genreList} value="{this.genreList.name}"> {this.genreList.name}</option>
|
|
</select>
|
|
|
|
<button onclick="{ obetirgenre }" > Ajouter </button>
|
|
|
|
<script>
|
|
export default{
|
|
onBeforeMount (props,state) {
|
|
this.state = {
|
|
genreList : []
|
|
}
|
|
},
|
|
async obetirgenre() {
|
|
let genres = await this.sa.getGenres()
|
|
this.update({genreList : genre})
|
|
console.log(genreList)
|
|
}
|
|
}
|
|
|
|
</script>
|
|
|
|
</kind> |