Skip to content

Commit

Permalink
docs(scrollbar): add fadeInTime & fadeOutTime option
Browse files Browse the repository at this point in the history
  • Loading branch information
theniceangel committed Jun 23, 2021
1 parent ddec5ba commit 514df8c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
16 changes: 15 additions & 1 deletion packages/vuepress-docs/docs/en-US/plugins/scroll-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,21 @@ new BScroll('.bs-wrapper', {
- **Type**: `number`
- **Default**: `300`

the scroll time after the scrollbar track is clicked,.
the scroll time after the scrollbar track is clicked.

### fadeInTime <Badge text="2.4.0" />

- **Type**: `number`
- **Default**: `250`

The duration of the animation when the scrollbar fades in.

### fadeOutTime <Badge text="2.4.0" />

- **Type**: `number`
- **Default**: `500`

The duration of the animation when the scrollbar fades out.

:::tip
When `scrollbar` is configured as `true`, the plugin uses the default plugin option.
Expand Down
14 changes: 11 additions & 3 deletions packages/vuepress-docs/docs/zh-CN/plugins/scroll-bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,20 @@ yarn add @better-scroll/scroll-bar

滚动条轨道被点击之后,滚动距离的计算方式,默认与浏览器的表现形式一样,可以配置为 `'clickedPoint'`,代表滚动条滚动至点击的位置。

### scrollbarTrackOffsetTime <Badge text="2.2.0" />
### fadeInTime <Badge text="2.4.0" />

- **类型**`number`
- **默认值**`300`
- **默认值**`250`

滚动条渐显的动画时长。

### fadeOutTime <Badge text="2.4.0" />

- **类型**`number`
- **默认值**`500`

滚动条渐隐的动画时长。

滚动条轨道被点击之后,滚动位移的时间

:::tip 提示
当 scrollbar 配置为 true 的时候,插件内部使用的是默认的插件选项对象。
Expand Down

0 comments on commit 514df8c

Please sign in to comment.