mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 18:14:13 +00:00
[new feature]: tabs component add swipeThreshold prop (#206)
This commit is contained in:
@@ -89,7 +89,7 @@ Vue.component(Tabs.name, Tabs);
|
||||
```
|
||||
:::
|
||||
|
||||
### 设置切换tab的动画时间
|
||||
#### 设置切换tab的动画时间
|
||||
|
||||
通过设置`duration`来指定时间,默认为0.3s,只接受`Number`类型参数。
|
||||
|
||||
@@ -103,11 +103,11 @@ Vue.component(Tabs.name, Tabs);
|
||||
```
|
||||
:::
|
||||
|
||||
#### 多于4个tab时
|
||||
#### 横向滚动tab
|
||||
|
||||
多于4个tab时,可以横向滚动tab。
|
||||
默认情况下多于4个tab时,可以横向滚动tab。可以通过设置`swipeThreshold`这个阙值,多于这个阙值时,tab就会支持横向滚动。
|
||||
|
||||
:::demo 多于4个tab时
|
||||
:::demo 横向滚动tab
|
||||
```html
|
||||
<van-tabs>
|
||||
<van-tab title="选项一">内容一</van-tab>
|
||||
|
Reference in New Issue
Block a user