0👍
So it’s rendering before the data comes in, and so it isn’t reactive here. You can use this.$forceUpdate()
at the end of the async function, or you can set another boolean to trigger start false and flag to true when the async function is complete, then use v-if
on the component.
- [Vuejs]-How in nuxt.js include ".html" suffix to page?
- [Vuejs]-How do I import the bootstrap.min.js into Vue JS
0👍
Are the options supposed to come from model
, or are they supposed to come from the component’s data
directly? If they’re supposed to come from model
then you’ll need to specify model.publisher_array
in the option
tag, then set model.publisher_array = data
(instead of this
) when you get the data from the API.
If the array should come from the component’s data directly, then all you have to do is specify an empty publisher_array
in data:
data () {
return {
publisher_array: [],
apis: new api(),
// And so on
}
}
- [Vuejs]-How to Watch value in daynamique array in vuejs
- [Vuejs]-Deploying Vue-Django-graphene on NGINX
Source:stackexchange.com