[new feature] Tab support sticky (#382)

This commit is contained in:
neverland
2017-12-06 14:19:08 +08:00
committed by GitHub
parent beb3ed141d
commit 80c2fdc18f
7 changed files with 148 additions and 33 deletions

View File

@@ -39,6 +39,14 @@
</van-tab>
</van-tabs>
</demo-block>
<demo-block :title="$t('title6')">
<van-tabs :active="active" sticky>
<van-tab :title="$t('tab') + index" v-for="index in tabs" :key="index">
{{ $t('content') }} {{ index }}
</van-tab>
</van-tabs>
</demo-block>
</demo-section>
</template>
@@ -50,7 +58,8 @@ export default {
title2: '横向滚动',
title3: '禁用标签',
title4: '样式风格',
title5: '点击事件'
title5: '点击事件',
title6: '粘性布局'
},
'en-US': {
tab: 'Tab ',
@@ -58,7 +67,8 @@ export default {
title2: 'Swipe Tabs',
title3: 'Disabled Tab',
title4: 'Card Style',
title5: 'Click Event'
title5: 'Click Event',
title6: 'Sticky'
}
},
@@ -89,6 +99,8 @@ export default {
<style lang="postcss">
.demo-tab {
margin-bottom: 1000px;
.van-tab__pane {
background-color: #fff;
padding: 20px;