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
<template>
<div class="mix-load-more" @click="loading">
<image
ref="loadingIcon"
class="mix-load-more__icon"
src="/static/loading.gif"
v-if="status == 1"
>
</image>
<text class="mix-load-more__text" :class="{'mix-load-more__text--disabled': status===2}">{{text[status]}}</text>
</div>
</template>
<script>
export default {
name: "mix-load-more",
props: {
status: {
//0加载前,1加载中,2没有更多了
type: Number,
default: 0
},
text: {
type: Array,
default () {
return [
'上拉显示更多',
'正在加载..',
'我也是有底线的~'
];
}
}
},
methods: {
},
}
</script>
<style>
.mix-load-more {
flex-direction: row;
justify-content: center;
align-items: center;
height: 60upx;
}
.mix-load-more__icon {
width: 36upx;
height: 36upx;
margin-right: 12upx;
}
.mix-load-more__text {
font-size: 28upx;
color: #aaa;
}
.mix-load-more__text--disabled {
font-size: 24upx;
color: #bbb;
}
</style>