Skip to content

Commit ae5aa52

Browse files
committed
修改:$u.sys更改为$u.sys()
1 parent 5fde468 commit ae5aa52

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

uview-ui/components/u-tabbar/u-tabbar.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
:color="elColor(index)"
2222
:custom-prefix="item.customIcon ? 'custom-icon' : 'uicon'"
2323
></u-icon>
24-
<u-badge :count="item.count" :is-dot="item.isDot"
24+
<u-badge :count="item.count" :is-dot="item.isDot"
2525
v-if="item.count"
2626
:offset="[-2, getOffsetRight(item.count, item.isDot)]"
2727
></u-badge>
@@ -41,7 +41,7 @@
4141
</view>
4242
</view>
4343
<!-- 这里加上一个48rpx的高度,是为了增高有凸起按钮时的防塌陷高度(也即按钮凸出来部分的高度) -->
44-
<view class="u-fixed-placeholder safe-area-inset-bottom" :style="{
44+
<view class="u-fixed-placeholder safe-area-inset-bottom" :style="{
4545
height: `calc(${$u.addUnit(height)} + ${midButton ? 48 : 0}rpx)`,
4646
}"></view>
4747
</view>
@@ -121,7 +121,7 @@
121121
data() {
122122
return {
123123
// 由于安卓太菜了,通过css居中凸起按钮的外层元素有误差,故通过js计算将其其中
124-
midButtonLeft: '50%',
124+
midButtonLeft: '50%',
125125
pageUrl: '', // 当前
126126
}
127127
},
@@ -183,7 +183,7 @@
183183
// promise返回成功,
184184
this.switchTab(index);
185185
}).catch(err => {
186-
186+
187187
})
188188
} else if(beforeSwitch === true) {
189189
// 如果返回true
@@ -221,7 +221,7 @@
221221
},
222222
// 获取凸起按钮外层元素的left值,让其水平居中
223223
getMidButtonLeft() {
224-
let windowWidth = this.$u.sys.windowWidth;
224+
let windowWidth = this.$u.sys().windowWidth;
225225
// 由于安卓中css计算left: 50%的结果不准确,故用js计算
226226
this.midButtonLeft = (windowWidth / 2) + 'px';
227227
}
@@ -259,7 +259,7 @@
259259
// 故使用js计算的形式来定位,此处不注释,是因为js计算有延后,避免出现位置闪动
260260
left: 50%;
261261
transform: translateX(-50%);
262-
262+
263263
&:after {
264264
border-radius: 100px;
265265
}

0 commit comments

Comments
 (0)