mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[Doc] Tab: update demo (#1603)
This commit is contained in:
parent
362964232d
commit
9a87e64e98
@ -22,7 +22,7 @@ Page({
|
||||
|
||||
onClickNavRight() {
|
||||
wx.showToast({
|
||||
title: '点击right nav',
|
||||
title: '点击 right nav',
|
||||
icon: 'none'
|
||||
});
|
||||
},
|
||||
|
@ -12,28 +12,6 @@
|
||||
</van-tabs>
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="自定义标题">
|
||||
<van-tabs active="{{ 1 }}" bind:change="onChange" tab-class="tab-class" tab-active-class="tab-active-class">
|
||||
<van-icon
|
||||
slot="nav-right"
|
||||
name="search"
|
||||
custom-class="right-nav"
|
||||
bind:click="onClickNavRight"
|
||||
/>
|
||||
<van-tab
|
||||
wx:for="1234"
|
||||
wx:key="index"
|
||||
title="{{ '标签' + item }}"
|
||||
dot="{{ index === 1 }}"
|
||||
info="{{ index === 2 ? 99 : null }}"
|
||||
>
|
||||
<view class="content">
|
||||
{{ '内容' + item }}
|
||||
</view>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="横向滚动">
|
||||
<van-tabs>
|
||||
<van-tab
|
||||
@ -64,7 +42,7 @@
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="样式风格">
|
||||
<van-tabs type="card">
|
||||
<van-tabs type="card" tab-class="tab-class" tab-active-class="tab-active-class">
|
||||
<van-tab
|
||||
wx:for="123"
|
||||
wx:key="index"
|
||||
@ -112,7 +90,7 @@
|
||||
wx:key="index"
|
||||
title="{{ '标签' + item }}"
|
||||
>
|
||||
<view class="content" style="height: 400px;">
|
||||
<view class="content">
|
||||
{{ '内容' + item }}
|
||||
</view>
|
||||
</van-tab>
|
||||
@ -132,3 +110,25 @@
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="自定义标题">
|
||||
<van-tabs active="{{ 1 }}" bind:change="onChange" tab-class="tab-class" tab-active-class="tab-active-class">
|
||||
<van-icon
|
||||
slot="nav-right"
|
||||
name="search"
|
||||
custom-class="right-nav"
|
||||
bind:click="onClickNavRight"
|
||||
/>
|
||||
<van-tab
|
||||
wx:for="1234"
|
||||
wx:key="index"
|
||||
title="{{ '标签' + item }}"
|
||||
dot="{{ index === 1 }}"
|
||||
info="{{ index === 2 ? 99 : null }}"
|
||||
>
|
||||
<view class="content">
|
||||
{{ '内容' + item }}
|
||||
</view>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</demo-block>
|
||||
|
@ -1,3 +1,7 @@
|
||||
page {
|
||||
padding-bottom: 300px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 20px;
|
||||
background-color: #fff;
|
||||
@ -18,5 +22,4 @@
|
||||
|
||||
.tab-active-class {
|
||||
font-size: 1.05em !important;
|
||||
color: #1989fa !important;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user