2020-01-30 04:37:25 +09:00
|
|
|
<template>
|
2021-08-15 20:26:44 +09:00
|
|
|
<div class="yxspomdl" :class="{ inline, colored, mini }">
|
2022-05-19 15:24:35 +09:00
|
|
|
<div class="container">
|
2022-05-19 17:21:08 +09:00
|
|
|
<svg class="spinner bg" viewBox="0 0 168 168" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<g transform="matrix(1.125,0,0,1.125,12,12)">
|
|
|
|
<circle cx="64" cy="64" r="64" style="fill:none;stroke:currentColor;stroke-width:21.33px;"/>
|
2022-05-19 15:24:35 +09:00
|
|
|
</g>
|
|
|
|
</svg>
|
2022-05-19 17:21:08 +09:00
|
|
|
<svg class="spinner fg" viewBox="0 0 168 168" xmlns="http://www.w3.org/2000/svg">
|
|
|
|
<g transform="matrix(1.125,0,0,1.125,12,12)">
|
|
|
|
<path d="M128,64C128,28.654 99.346,0 64,0C99.346,0 128,28.654 128,64Z" style="fill:none;stroke:currentColor;stroke-width:21.33px;"/>
|
2022-05-19 15:24:35 +09:00
|
|
|
</g>
|
|
|
|
</svg>
|
|
|
|
</div>
|
2020-01-30 04:37:25 +09:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-01-16 07:47:28 +09:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { } from 'vue';
|
2020-01-30 04:37:25 +09:00
|
|
|
|
2022-01-16 07:47:28 +09:00
|
|
|
const props = withDefaults(defineProps<{
|
|
|
|
inline?: boolean;
|
|
|
|
colored?: boolean;
|
|
|
|
mini?: boolean;
|
|
|
|
}>(), {
|
|
|
|
inline: false,
|
|
|
|
colored: true,
|
|
|
|
mini: false,
|
2020-01-30 04:37:25 +09:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2022-05-19 15:24:35 +09:00
|
|
|
@keyframes spinner {
|
2020-02-10 20:44:59 +09:00
|
|
|
0% {
|
|
|
|
transform: rotate(0deg);
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
transform: rotate(360deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-30 04:37:25 +09:00
|
|
|
.yxspomdl {
|
|
|
|
padding: 32px;
|
|
|
|
text-align: center;
|
2021-04-16 23:04:25 +09:00
|
|
|
cursor: wait;
|
|
|
|
|
2022-05-19 15:24:35 +09:00
|
|
|
--size: 40px;
|
2021-08-15 20:26:44 +09:00
|
|
|
|
2021-04-16 23:04:25 +09:00
|
|
|
&.colored {
|
|
|
|
color: var(--accent);
|
|
|
|
}
|
2020-01-30 04:37:25 +09:00
|
|
|
|
2020-02-12 02:52:37 +09:00
|
|
|
&.inline {
|
|
|
|
display: inline;
|
|
|
|
padding: 0;
|
2021-08-15 20:26:44 +09:00
|
|
|
--size: 32px;
|
|
|
|
}
|
2020-02-12 02:52:37 +09:00
|
|
|
|
2021-08-15 20:26:44 +09:00
|
|
|
&.mini {
|
|
|
|
padding: 16px;
|
|
|
|
--size: 32px;
|
2020-02-12 02:52:37 +09:00
|
|
|
}
|
|
|
|
|
2022-05-19 15:24:35 +09:00
|
|
|
> .container {
|
2021-04-16 23:04:25 +09:00
|
|
|
position: relative;
|
2022-05-19 15:24:35 +09:00
|
|
|
width: var(--size);
|
|
|
|
height: var(--size);
|
|
|
|
margin: 0 auto;
|
2020-02-10 20:44:59 +09:00
|
|
|
|
2022-05-19 15:24:35 +09:00
|
|
|
> .spinner {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2021-08-15 20:26:44 +09:00
|
|
|
width: var(--size);
|
|
|
|
height: var(--size);
|
2022-05-19 15:24:35 +09:00
|
|
|
fill-rule: evenodd;
|
|
|
|
clip-rule: evenodd;
|
|
|
|
stroke-linecap: round;
|
|
|
|
stroke-linejoin: round;
|
|
|
|
stroke-miterlimit: 1.5;
|
2021-04-16 23:04:25 +09:00
|
|
|
}
|
|
|
|
|
2022-05-19 15:24:35 +09:00
|
|
|
> .bg {
|
|
|
|
opacity: 0.275;
|
2021-04-16 23:04:25 +09:00
|
|
|
}
|
|
|
|
|
2022-05-19 15:24:35 +09:00
|
|
|
> .fg {
|
|
|
|
animation: spinner 0.5s linear infinite;
|
2021-04-16 23:04:25 +09:00
|
|
|
}
|
2020-01-30 04:37:25 +09:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|