mix-icon-loading.vue
957 Bytes
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<template>
<view class="mix-icon-loading">
<view
class="loading-icon"
:style="{
width: size,
height: size,
borderRightColor: color
}"
></view>
</view>
</template>
<script>
/**
* 菊花loading小图标
* @prop size 尺寸,单位rpx
* @prop color 颜色
*/
export default {
name: 'MixIconLoading',
data() {
return {
};
},
props: {
size: {
type: String,
default: '26rpx'
},
color: {
type: String,
default: '#999'
}
},
methods: {
}
}
</script>
<style scoped lang='scss'>
.mix-icon-loading{
display: flex;
align-items: center;
justify-content: center;
width: auto;
height: auto;
}
.loading-icon{
width: 28rpx;
height: 28rpx;
border: 4rpx solid #ddd;
animation: mix-loading 1.8s steps(12) infinite;
border-radius: 100rpx;
}
@keyframes mix-loading{
from {
transform:rotate(0deg)
}
to {
transform: rotate(1turn)
}
}
</style>