2020-01-29 19:37:25 +00:00
|
|
|
<template>
|
2021-08-15 11:26:44 +00:00
|
|
|
<div class="yxspomdl" :class="{ inline, colored, mini }">
|
2020-02-10 11:44:59 +00:00
|
|
|
<div class="ring"></div>
|
2020-01-29 19:37:25 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-01-15 22:47:28 +00:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { } from 'vue';
|
2020-01-29 19:37:25 +00:00
|
|
|
|
2022-01-15 22:47:28 +00:00
|
|
|
const props = withDefaults(defineProps<{
|
|
|
|
inline?: boolean;
|
|
|
|
colored?: boolean;
|
|
|
|
mini?: boolean;
|
|
|
|
}>(), {
|
|
|
|
inline: false,
|
|
|
|
colored: true,
|
|
|
|
mini: false,
|
2020-01-29 19:37:25 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2020-02-10 11:44:59 +00:00
|
|
|
@keyframes ring {
|
|
|
|
0% {
|
|
|
|
transform: rotate(0deg);
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform: rotate(360deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-29 19:37:25 +00:00
|
|
|
.yxspomdl {
|
|
|
|
padding: 32px;
|
|
|
|
text-align: center;
|
2021-04-16 14:04:25 +00:00
|
|
|
cursor: wait;
|
|
|
|
|
2021-08-15 11:26:44 +00:00
|
|
|
--size: 48px;
|
|
|
|
|
2021-04-16 14:04:25 +00:00
|
|
|
&.colored {
|
|
|
|
color: var(--accent);
|
|
|
|
}
|
2020-01-29 19:37:25 +00:00
|
|
|
|
2020-02-11 17:52:37 +00:00
|
|
|
&.inline {
|
|
|
|
display: inline;
|
|
|
|
padding: 0;
|
2021-08-15 11:26:44 +00:00
|
|
|
--size: 32px;
|
|
|
|
}
|
2020-02-11 17:52:37 +00:00
|
|
|
|
2021-08-15 11:26:44 +00:00
|
|
|
&.mini {
|
|
|
|
padding: 16px;
|
|
|
|
--size: 32px;
|
2020-02-11 17:52:37 +00:00
|
|
|
}
|
|
|
|
|
2020-02-10 11:44:59 +00:00
|
|
|
> .ring {
|
2021-04-16 14:04:25 +00:00
|
|
|
position: relative;
|
2020-02-10 11:44:59 +00:00
|
|
|
display: inline-block;
|
2020-02-11 17:35:03 +00:00
|
|
|
vertical-align: middle;
|
2020-02-10 11:44:59 +00:00
|
|
|
|
2021-04-16 14:04:25 +00:00
|
|
|
&:before,
|
|
|
|
&:after {
|
|
|
|
content: " ";
|
|
|
|
display: block;
|
|
|
|
box-sizing: border-box;
|
2021-08-15 11:26:44 +00:00
|
|
|
width: var(--size);
|
|
|
|
height: var(--size);
|
2021-04-16 14:04:25 +00:00
|
|
|
border-radius: 50%;
|
|
|
|
border: solid 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:before {
|
|
|
|
border-color: currentColor;
|
|
|
|
opacity: 0.3;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
border-color: currentColor transparent transparent transparent;
|
|
|
|
animation: ring 0.5s linear infinite;
|
|
|
|
}
|
2020-01-29 19:37:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|