|
1 | 1 | <template> |
2 | 2 | <view class="uni-load-more" @click="onClick"> |
3 | 3 | <!-- #ifdef APP-NVUE --> |
4 | | - <loading-indicator v-if="status === 'loading' && showIcon" :style="{color: color}" :animating="true" class="uni-load-more__img uni-load-more__img--nvue"></loading-indicator> |
| 4 | + <loading-indicator v-if="status === 'loading' && showIcon" :style="{color: color,width:iconSize+'px',height:iconSize+'px'}" :animating="true" class="uni-load-more__img uni-load-more__img--nvue"></loading-indicator> |
5 | 5 | <!-- #endif --> |
6 | 6 | <!-- #ifdef H5 --> |
7 | | - <svg width="24" height="24" viewBox="25 25 50 50" v-if="(iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon" class="uni-load-more__img uni-load-more__img--android-H5"> |
| 7 | + <svg width="24" height="24" viewBox="25 25 50 50" v-if="(iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon" :style="{width:iconSize+'px',height:iconSize+'px'}" class="uni-load-more__img uni-load-more__img--android-H5"> |
8 | 8 | <circle cx="50" cy="50" r="20" fill="none" :style="{color:color}" stroke-width="3"></circle> |
9 | 9 | </svg> |
10 | | - <view v-else-if="status === 'loading' && showIcon" class="uni-load-more__img uni-load-more__img--ios-H5"> |
11 | | - <view :style="{backgroundColor:color}"></view> |
12 | | - <view :style="{backgroundColor:color}"></view> |
13 | | - <view :style="{backgroundColor:color}"></view> |
14 | | - <view :style="{backgroundColor:color}"></view> |
15 | | - <view :style="{backgroundColor:color}"></view> |
16 | | - <view :style="{backgroundColor:color}"></view> |
17 | | - <view :style="{backgroundColor:color}"></view> |
18 | | - <view :style="{backgroundColor:color}"></view> |
19 | | - <view :style="{backgroundColor:color}"></view> |
20 | | - <view :style="{backgroundColor:color}"></view> |
21 | | - <view :style="{backgroundColor:color}"></view> |
22 | | - <view :style="{backgroundColor:color}"></view> |
23 | | - </view> |
24 | 10 | <!-- #endif --> |
25 | 11 | <!-- #ifndef APP-NVUE || H5 --> |
26 | | - <view v-if="(iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon" class="uni-load-more__img uni-load-more__img--android-MP"> |
| 12 | + <view v-if="(iconType==='circle' || iconType==='auto' && platform === 'android') && status === 'loading' && showIcon" :style="{width:iconSize+'px',height:iconSize+'px'}" class="uni-load-more__img uni-load-more__img--android-MP"> |
27 | 13 | <view :style="{borderTopColor:color}"></view> |
28 | 14 | <view :style="{borderTopColor:color}"></view> |
29 | 15 | <view :style="{borderTopColor:color}"></view> |
30 | 16 | </view> |
31 | | - <view v-else-if="status === 'loading' && showIcon" class="uni-load-more__img uni-load-more__img--ios-H5"> |
32 | | - <view :style="{backgroundColor:color}"></view> |
33 | | - <view :style="{backgroundColor:color}"></view> |
34 | | - <view :style="{backgroundColor:color}"></view> |
35 | | - <view :style="{backgroundColor:color}"></view> |
36 | | - <view :style="{backgroundColor:color}"></view> |
37 | | - <view :style="{backgroundColor:color}"></view> |
38 | | - <view :style="{backgroundColor:color}"></view> |
39 | | - <view :style="{backgroundColor:color}"></view> |
40 | | - <view :style="{backgroundColor:color}"></view> |
41 | | - <view :style="{backgroundColor:color}"></view> |
42 | | - <view :style="{backgroundColor:color}"></view> |
43 | | - <view :style="{backgroundColor:color}"></view> |
| 17 | + <!-- #endif --> |
| 18 | + <!-- #ifndef APP-NVUE --> |
| 19 | + <view v-else-if="status === 'loading' && showIcon" :style="{width:iconSize+'px',height:iconSize+'px'}" class="uni-load-more__img uni-load-more__img--ios-H5"> |
| 20 | + <view v-for="i in 12" :key="i" :style="{backgroundColor:color,height:iconSize/4+'px',transformOrigin:'1px '+iconSize/2+'px','-webkit-TransformOrigin':'1px '+iconSize/2+'px'}"></view> |
44 | 21 | </view> |
45 | 22 | <!-- #endif --> |
46 | 23 | <text class="uni-load-more__text" :style="{color: color}">{{ status === 'more' ? contentText.contentdown : status === 'loading' ? contentText.contentrefresh : contentText.contentnomore }}</text> |
|
65 | 42 | type: String, |
66 | 43 | default: 'auto' |
67 | 44 | }, |
| 45 | + iconSize: { |
| 46 | + type: Number, |
| 47 | + default: 24 |
| 48 | + }, |
68 | 49 | color: { |
69 | 50 | type: String, |
70 | 51 | default: '#777777' |
|
153 | 134 | position: absolute; |
154 | 135 | height: 6px; |
155 | 136 | width: 2px; |
156 | | - left: 11px; |
| 137 | + left: 50%; |
157 | 138 | top: 0; |
| 139 | + margin-left: -1px; |
158 | 140 | transform-origin: 1px 12px; |
159 | 141 | } |
160 | 142 |
|
|
0 commit comments