Skip to content

Commit b7064f1

Browse files
committed
update(uni-ui): uni-load-more新增图标大小选项
1 parent 6dda94d commit b7064f1

5 files changed

Lines changed: 45 additions & 44 deletions

File tree

‎components/uni-fab/uni-fab.vue‎

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,19 @@
2929
'uni-fab__plus--active': isShow,
3030
'uni-fab__content--other-platform': !isAndroidNvue
3131
}" class="uni-fab__circle uni-fab__plus" :style="{ 'background-color': styles.buttonColor }" @click="_onClick">
32-
<uni-icons type="plusempty" color="#FFFFFF" size="48"></uni-icons>
32+
<view class="fab-circle-v"></view>
33+
<view class="fab-circle-h"></view>
3334
</view>
3435
</view>
3536
</view>
3637
</template>
3738

3839
<script>
39-
import uniIcons from '../uni-icons/uni-icons.vue'
4040
let platform = 'other'
4141
// #ifdef APP-NVUE
4242
platform = uni.getSystemInfoSync().platform
4343
// #endif
4444
export default {
45-
components: {
46-
uniIcons
47-
},
4845
name: 'UniFab',
4946
props: {
5047
pattern: {
@@ -139,7 +136,6 @@
139136
}
140137
},
141138
created() {
142-
console.log(platform)
143139
this.isShow = this.show
144140
if (this.top === 0) {
145141
this.fabShow = true
@@ -269,8 +265,6 @@
269265
}
270266
271267
.uni-fab__plus {
272-
font-size: 40px;
273-
line-height: 40px;
274268
transform: rotate(0deg);
275269
transition: transform 0.3s;
276270
font-weight: bold;
@@ -280,6 +274,24 @@
280274
transform: rotate(135deg);
281275
}
282276
277+
.fab-circle-v {
278+
position: absolute;
279+
width: 3px;
280+
height: 31px;
281+
left: 26px;
282+
top: 12px;
283+
background-color: white;
284+
}
285+
286+
.fab-circle-h {
287+
position: absolute;
288+
width: 31px;
289+
height: 3px;
290+
left: 12px;
291+
top: 26px;
292+
background-color: white;
293+
}
294+
283295
.uni-fab__content {
284296
/* #ifndef APP-NVUE */
285297
box-sizing: border-box;

‎components/uni-list/uni-list.vue‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
scrollY: {
2828
type: [Boolean, String],
29-
default: true
29+
default: false
3030
}
3131
},
3232
provide() {
@@ -52,9 +52,12 @@
5252
background-color: #ffffff;
5353
position: relative;
5454
flex-direction: column;
55-
/* border-bottom-color: $uni-border-color; */
56-
/* border-bottom-style: solid; */
57-
/* border-bottom-width: 1px; */
55+
/* border-bottom-color: $uni-border-color;
56+
*/
57+
/* border-bottom-style: solid;
58+
*/
59+
/* border-bottom-width: 1px;
60+
*/
5861
}
5962
6063
/* #ifndef APP-NVUE */

‎components/uni-load-more/uni-load-more.vue‎

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,23 @@
11
<template>
22
<view class="uni-load-more" @click="onClick">
33
<!-- #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>
55
<!-- #endif -->
66
<!-- #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">
88
<circle cx="50" cy="50" r="20" fill="none" :style="{color:color}" stroke-width="3"></circle>
99
</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>
2410
<!-- #endif -->
2511
<!-- #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">
2713
<view :style="{borderTopColor:color}"></view>
2814
<view :style="{borderTopColor:color}"></view>
2915
<view :style="{borderTopColor:color}"></view>
3016
</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>
4421
</view>
4522
<!-- #endif -->
4623
<text class="uni-load-more__text" :style="{color: color}">{{ status === 'more' ? contentText.contentdown : status === 'loading' ? contentText.contentrefresh : contentText.contentnomore }}</text>
@@ -65,6 +42,10 @@
6542
type: String,
6643
default: 'auto'
6744
},
45+
iconSize: {
46+
type: Number,
47+
default: 24
48+
},
6849
color: {
6950
type: String,
7051
default: '#777777'
@@ -153,8 +134,9 @@
153134
position: absolute;
154135
height: 6px;
155136
width: 2px;
156-
left: 11px;
137+
left: 50%;
157138
top: 0;
139+
margin-left: -1px;
158140
transform-origin: 1px 12px;
159141
}
160142

‎pages.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,4 +1136,4 @@
11361136
}
11371137
]
11381138
}
1139-
}
1139+
}

‎pages/extUI/load-more/load-more.nvue‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
<uni-load-more iconType="snow" :status="status" />
2828
</view>
2929
<!-- #endif -->
30+
<uni-section title="指定加载图标大小" type="line"></uni-section>
31+
<view class="example-body">
32+
<uni-load-more iconType="snow" :iconSize="36" :status="status" />
33+
</view>
3034
<uni-section title="点击事件" type="line"></uni-section>
3135
<view class="example-body">
3236
<uni-load-more :status="status" @clickLoadMore="clickLoadMore" />

0 commit comments

Comments
 (0)