clean code
This commit is contained in:
parent
e79a8bcd7d
commit
0ee3b9fdd1
@ -18,15 +18,14 @@
|
||||
export default {
|
||||
async onBeforeMount(props){
|
||||
this.state.placeholder = 'Rechercher dans les albums';
|
||||
this.fetchSong();
|
||||
},
|
||||
edit(e) {
|
||||
|
||||
},
|
||||
click(e) {
|
||||
e.preventDefault();
|
||||
|
||||
this.clearButton();
|
||||
|
||||
switch (e.target.attributes.value.value) {
|
||||
case 'Songs':
|
||||
this.state.placeholder = "Rechercher dans les songs"
|
||||
@ -52,6 +51,12 @@
|
||||
document.getElementById("album").style.borderColor = "#6EE7B7";
|
||||
document.getElementById("artist").style.backgroundColor = "#D1FAE5";
|
||||
document.getElementById("artist").style.borderColor = "#6EE7B7";
|
||||
},
|
||||
async fetchSong(){
|
||||
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/songs").then(response => {
|
||||
console.log(response.json());
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user