1.0.9 • Published 7 years ago

pb-tab v1.0.9

Weekly downloads
9
License
MIT
Repository
github
Last release
7 years ago

Ly-tab

A better mobile touch-swappable reusable component for Vue 2.0

一个用于移动端的可触摸滑动具有回弹效果的可复用Vue组件

demo效果

image

Installation

npm i ly-tab -S

Usage

import Vue from 'vue';
import LyTab from 'ly-tab';

Vue.use(LyTab);

Example

<ly-tab v-model="selected">

  <!-- 需通过v-model双向传递索引值, selected是你自己定义的一个在data中用于存放当前tab-item的索引值的变量 -->
  
  <ly-tab-item v-for="(item, index) in tabList" :key="index">
    {{item.itemName}}
  </ly-tab-item>
</ly-tab>
配置项类型描述默认值
lineWidthNumberfixBottom为false时tabbar底部border-width1px
activeColorString激活状态下字体color以及border-bottom-colorred
fixBottomBoolean是否固定在视图底部false
additionalXNumber近似等于超出边界时最大可拖动距离50px
reBoundExponentNumber惯性回弹指数(值越大,幅度越大,惯性回弹距离越长)10
sensitivityNumber惯性滑动时的灵敏度(值越小,阻力越大),可近似认为手松开后速度减为零所需时间1000ms
reBoundingDurationNumber回弹动画duration360ms

Repository

github: https://github.com/ScoutYin/ly-tab.git

License

MIT

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago