0👍
I think there might be a misunderstanding of what v-cloak
does.
v-cloak
This directive will remain on the element until the associated Vue instance finishes compilation.
if you want to hide something while something is loading, you need to manage the state and the loader yourself.
Usually this is done with something like a computed
that is updated once data is loaded, which toggles the loader
component for the other components using v-if
or v-show
here is a simplified example…
<template>
<MySpinner v-if="loading"/>
<MyTable v-else :data="myAsynchData"/>
<template>
<script>
//... some code here
computed: {
loading => this.myAsynchData == undefined
}
//... more code
</script>
- [Vuejs]-Issue passing array to field
- [Vuejs]-How download pdf result without previewing and without changing page in nuxt project?
Source:stackexchange.com