modified code
This commit is contained in:
parent
b0f26ef9c3
commit
265bbd35c1
@ -22,12 +22,8 @@
|
|||||||
} )
|
} )
|
||||||
}
|
}
|
||||||
|
|
||||||
async function wait_data(){
|
|
||||||
return await this.fetch_data()
|
|
||||||
}
|
|
||||||
|
|
||||||
riot.compile().then(() => {
|
riot.compile().then(() => {
|
||||||
riot.mount('onzer', {items: wait_data()});
|
riot.mount('onzer', {items: fetch_data()});
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -29,14 +29,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
onBeforeMount(props){
|
async onBeforeMount(props){
|
||||||
console.log(props.items.value);
|
|
||||||
this.state = {
|
this.state = {
|
||||||
placeholder: "Rechercher dans les albums",
|
placeholder: "Rechercher dans les albums",
|
||||||
items: props.value.items.results,
|
items: await props.value.items,
|
||||||
search: "albums"
|
search: "albums"
|
||||||
};
|
};
|
||||||
this.paintButton();
|
this.paintButton();
|
||||||
|
console.log(props);
|
||||||
|
console.log(this.state.items);
|
||||||
this.album_style = "isActivate";
|
this.album_style = "isActivate";
|
||||||
},
|
},
|
||||||
onMounted(){
|
onMounted(){
|
||||||
|
Loading…
Reference in New Issue
Block a user