File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222
2323 onClickNavRight ( ) {
2424 wx . showToast ( {
25- title : '点击right nav' ,
25+ title : '点击 right nav' ,
2626 icon : 'none'
2727 } ) ;
2828 } ,
Original file line number Diff line number Diff line change 1212 </van-tabs>
1313</demo-block>
1414
15- <demo-block title="自定义标题">
16- <van-tabs active="{{ 1 }}" bind:change="onChange" tab-class="tab-class" tab-active-class="tab-active-class">
17- <van-icon
18- slot="nav-right"
19- name="search"
20- custom-class="right-nav"
21- bind:click="onClickNavRight"
22- />
23- <van-tab
24- wx:for="1234"
25- wx:key="index"
26- title="{{ '标签' + item }}"
27- dot="{{ index === 1 }}"
28- info="{{ index === 2 ? 99 : null }}"
29- >
30- <view class="content">
31- {{ '内容' + item }}
32- </view>
33- </van-tab>
34- </van-tabs>
35- </demo-block>
36-
3715<demo-block title="横向滚动">
3816 <van-tabs>
3917 <van-tab
6442</demo-block>
6543
6644<demo-block title="样式风格">
67- <van-tabs type="card">
45+ <van-tabs type="card" tab-class="tab-class" tab-active-class="tab-active-class" >
6846 <van-tab
6947 wx:for="123"
7048 wx:key="index"
11290 wx:key="index"
11391 title="{{ '标签' + item }}"
11492 >
115- <view class="content" style="height: 400px;" >
93+ <view class="content">
11694 {{ '内容' + item }}
11795 </view>
11896 </van-tab>
132110 </van-tab>
133111 </van-tabs>
134112</demo-block>
113+
114+ <demo-block title="自定义标题">
115+ <van-tabs active="{{ 1 }}" bind:change="onChange" tab-class="tab-class" tab-active-class="tab-active-class">
116+ <van-icon
117+ slot="nav-right"
118+ name="search"
119+ custom-class="right-nav"
120+ bind:click="onClickNavRight"
121+ />
122+ <van-tab
123+ wx:for="1234"
124+ wx:key="index"
125+ title="{{ '标签' + item }}"
126+ dot="{{ index === 1 }}"
127+ info="{{ index === 2 ? 99 : null }}"
128+ >
129+ <view class="content">
130+ {{ '内容' + item }}
131+ </view>
132+ </van-tab>
133+ </van-tabs>
134+ </demo-block>
Original file line number Diff line number Diff line change 1+ page {
2+ padding-bottom: 300px;
3+ }
4+
15.content {
26 padding: 20px;
37 background-color: #fff;
1822
1923.tab-active-class {
2024 font-size: 1.05em !important;
21- color: #1989fa !important;
2225}
You can’t perform that action at this time.
0 commit comments