modified code
This commit is contained in:
parent
30c8522de9
commit
0e1c264047
@ -18,7 +18,8 @@
|
|||||||
export default {
|
export default {
|
||||||
async onBeforeMount(props){
|
async onBeforeMount(props){
|
||||||
this.state.placeholder = 'Rechercher dans les albums';
|
this.state.placeholder = 'Rechercher dans les albums';
|
||||||
this.fetchSong();
|
this.state.items = await this.fetchSong();
|
||||||
|
console.log(this.state.items);
|
||||||
},
|
},
|
||||||
edit(e) {
|
edit(e) {
|
||||||
|
|
||||||
@ -54,7 +55,7 @@
|
|||||||
},
|
},
|
||||||
async fetchSong(){
|
async fetchSong(){
|
||||||
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/songs").then(response => {
|
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/songs").then(response => {
|
||||||
return response;
|
return response.json();
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user