Answer the question
In order to leave comments, you need to log in
Need to make v-loading work before hooks?
I use loader
libraries element-io
. The problem is this: when I enter my personal account, I need it to spin loader
until the personal account is completely rendered, i.e. another component to which router.push is thrown B data
> state
> isLoading
is set to true; But, now when entering, it loader
starts spinning after 1 second, and this is logical, it works on the mounted hook when the tree is mounted, because my loader is in dive
; Question: tell me how to implement the logic I conceived, that is, to loading
spin until the component on which I push is completely rendered? Thank you in advance for your help!)
<template>
<div
v-loading.fullscreen="isLoading"
element-loading-text="Загрузка..."
element-loading-background="rgba(0, 0, 0, 0.8)"
>
...множество другого кода, который не относится к теме, удалил чтоб не засорять
</div>
</template>
Answer the question
In order to leave comments, you need to log in
according to the normal loader, you need to insert it into App.vue, or if you don’t want it, then into the root element of the section you need. Well, connect it as a plugin so that you can reach its methods.
You can see how other similar loader plugins are implemented. They are full
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question