Skip to content

Commit 4353aa9

Browse files
committed
feat(tabbar): support reactive tabbar
1 parent 9d0b059 commit 4353aa9

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

src/tabbar/tabbar.less

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@import "../../src/weui-wxss/src/style/base/fn";
2+
3+
@media only screen and (min-width: 450px) {
4+
.weui-tabbar {
5+
flex-direction: column;
6+
7+
width: 60px;
8+
height: 100%;
9+
10+
&:before {
11+
left: unset;
12+
height: unset;
13+
.setRightLine(@weuiLineColorLight);
14+
}
15+
}
16+
17+
.weui-tabbar__item {
18+
flex: none;
19+
}
20+
}

tools/demo/example/tabbar/tabbar.wxml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
<view class="page__title">Tabbar</view>
44
<view class="page__desc">类似小程序原生tabbar的组件,可用于自定义tabbar</view>
55
</view>
6-
<mp-tabbar style="position:fixed;bottom:0;width:100%;left:0;right:0;" list="{{list}}" bindchange="tabChange"></mp-tabbar>
6+
<mp-tabbar class="tabbar" list="{{list}}" bindchange="tabChange"></mp-tabbar>
77
</view>

tools/demo/example/tabbar/tabbar.wxss

+24
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,26 @@
11
/* example/tabbar/tabbar.wxss */
22
@import '../common.wxss';
3+
4+
@media only screen and (min-width: 450px) {
5+
.page__hd {
6+
margin-left: 60px;
7+
}
8+
9+
.tabbar {
10+
position:fixed;
11+
top: 0;
12+
bottom:0;
13+
width: unset;
14+
height: 100%;
15+
left:0;
16+
right: unset;
17+
}
18+
}
19+
20+
.tabbar {
21+
position:fixed;
22+
bottom:0;
23+
width:100%;
24+
left:0;
25+
right:0;
26+
}

0 commit comments

Comments
 (0)