File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
uview-ui/components/u-tabbar Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 21
21
:color =" elColor(index)"
22
22
:custom-prefix =" item.customIcon ? 'custom-icon' : 'uicon'"
23
23
></u-icon >
24
- <u-badge :count =" item.count" :is-dot =" item.isDot"
24
+ <u-badge :count =" item.count" :is-dot =" item.isDot"
25
25
v-if =" item.count"
26
26
:offset =" [-2, getOffsetRight(item.count, item.isDot)]"
27
27
></u-badge >
41
41
</view >
42
42
</view >
43
43
<!-- 这里加上一个48rpx的高度,是为了增高有凸起按钮时的防塌陷高度(也即按钮凸出来部分的高度) -->
44
- <view class =" u-fixed-placeholder safe-area-inset-bottom" :style =" {
44
+ <view class =" u-fixed-placeholder safe-area-inset-bottom" :style =" {
45
45
height: `calc(${$u.addUnit(height)} + ${midButton ? 48 : 0}rpx)`,
46
46
}" ></view >
47
47
</view >
121
121
data () {
122
122
return {
123
123
// 由于安卓太菜了,通过css居中凸起按钮的外层元素有误差,故通过js计算将其其中
124
- midButtonLeft: ' 50%' ,
124
+ midButtonLeft: ' 50%' ,
125
125
pageUrl: ' ' , // 当前
126
126
}
127
127
},
183
183
// promise返回成功,
184
184
this .switchTab (index);
185
185
}).catch (err => {
186
-
186
+
187
187
})
188
188
} else if (beforeSwitch === true ) {
189
189
// 如果返回true
221
221
},
222
222
// 获取凸起按钮外层元素的left值,让其水平居中
223
223
getMidButtonLeft () {
224
- let windowWidth = this .$u .sys .windowWidth ;
224
+ let windowWidth = this .$u .sys () .windowWidth ;
225
225
// 由于安卓中css计算left: 50%的结果不准确,故用js计算
226
226
this .midButtonLeft = (windowWidth / 2 ) + ' px' ;
227
227
}
259
259
// 故使用js计算的形式来定位,此处不注释,是因为js计算有延后,避免出现位置闪动
260
260
left : 50% ;
261
261
transform : translateX (-50% );
262
-
262
+
263
263
& :after {
264
264
border-radius : 100px ;
265
265
}
You can’t perform that action at this time.
0 commit comments