1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
| <template>
| <div
| class="status-img flex-center"
| :style="{ width: `${wrapperSize}px`, height: `${wrapperSize}px`, backgroundImage: `url(${iconBg2})` }"
| >
| <img
| class="status-img__inner"
| :class="{ 'status-img__inner_work': isWork }"
| :src="isWork ? iconWork : iconUnWork"
| :width="size"
| :height="size"
| />
| </div>
| </template>
|
| <script setup lang="ts">
| const props = defineProps({
| isWork: {
| type: Boolean,
| required: true,
| },
| wrapperSize: {
| type: Number,
| default: 40,
| },
| size: {
| type: Number,
| default: 20,
| },
| });
|
| const { isWork, size } = toRefs(props);
|
| import iconBg2 from '/@/assets/images/szjt/icon_bg2.png';
| import iconWork from '/@/assets/images/szjt/icon_work.png';
| import iconUnWork from '/@/assets/images/szjt/icon_unwork.png';
| import { toRefs } from 'vue';
| </script>
| <style scoped lang="scss">
| .status-img {
| background-size: cover;
| background-repeat: no-repeat;
| &__inner {
| &_work {
| animation: rotate0_360 2s linear infinite normal;
| -webkit-animation: rotate0_360 2s linear infinite normal;
| }
| }
| }
| </style>
|
|