Loading
Uso global
this.$store.commit('global/setBusy')
// await some function
this.$store.commit('global/setFree')Uso en componente
<template>
<div>
<loading :active="isBusy" />
// cuerpo del código
</div>
</template>
<script>
import Loading from '~/components/dna/layouts/LoadingComponent'
export default {
data: {
return {
isBusy: false
}
},
methods: {
someProcess() {
this.isBusy = true
// await some function
this.isBusy = false
}
}
}
</script>Última actualización