Browse Source
fix: spinner may stop playing animation after dismiss (#5365)
* fix: spinner may stop playing animation after dismiss
* fix: animation paused more safely
pull/5367/head
Netfan
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
11 additions and
0 deletions
-
packages/@core/ui-kit/shadcn-ui/src/components/spinner/spinner.vue
|
|
|
@ -73,12 +73,23 @@ function onTransitionEnd() { |
|
|
|
@transitionend="onTransitionEnd" |
|
|
|
> |
|
|
|
<div |
|
|
|
:class="{ paused: !renderSpinner }" |
|
|
|
class="loader before:bg-primary/50 after:bg-primary relative size-12 before:absolute before:left-0 before:top-[60px] before:h-[5px] before:w-12 before:rounded-[50%] before:content-[''] after:absolute after:left-0 after:top-0 after:h-full after:w-full after:rounded after:content-['']" |
|
|
|
></div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
.paused { |
|
|
|
&::before { |
|
|
|
animation-play-state: paused !important; |
|
|
|
} |
|
|
|
|
|
|
|
&::after { |
|
|
|
animation-play-state: paused !important; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.loader { |
|
|
|
&::before { |
|
|
|
animation: loader-shadow-ani 0.5s linear infinite; |
|
|
|
|