clean code
This commit is contained in:
parent
e79a8bcd7d
commit
0ee3b9fdd1
@ -18,15 +18,14 @@
|
|||||||
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();
|
||||||
},
|
},
|
||||||
edit(e) {
|
edit(e) {
|
||||||
|
|
||||||
},
|
},
|
||||||
click(e) {
|
click(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
this.clearButton();
|
this.clearButton();
|
||||||
|
|
||||||
switch (e.target.attributes.value.value) {
|
switch (e.target.attributes.value.value) {
|
||||||
case 'Songs':
|
case 'Songs':
|
||||||
this.state.placeholder = "Rechercher dans les songs"
|
this.state.placeholder = "Rechercher dans les songs"
|
||||||
@ -52,6 +51,12 @@
|
|||||||
document.getElementById("album").style.borderColor = "#6EE7B7";
|
document.getElementById("album").style.borderColor = "#6EE7B7";
|
||||||
document.getElementById("artist").style.backgroundColor = "#D1FAE5";
|
document.getElementById("artist").style.backgroundColor = "#D1FAE5";
|
||||||
document.getElementById("artist").style.borderColor = "#6EE7B7";
|
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>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user