feat: Add dedicated default loading component

* add option to pass a transition name

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-11-20 18:22:30 +01:00
parent 4e8ff6201a
commit 668fed1dc4
6 changed files with 137 additions and 65 deletions
+12 -1
View File
@@ -51,7 +51,7 @@ const updateElements = () => {
<template>
<VueFlow
v-model="elements"
:show-loading-indicator="true"
:loading="{ label: 'Loading...', transition: { name: 'fade', mode: 'out-in' } }"
@load="onLoad"
@elementsRemove="onElementsRemove"
@connect="onConnect"
@@ -66,3 +66,14 @@ const updateElements = () => {
</div>
</VueFlow>
</template>
<style>
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.35s ease;
}
.fade-enter-from,
.fade-leave-active {
opacity: 0;
}
</style>