types(IndexBar): add scrollTo method (#7845)

This commit is contained in:
neverland
2021-01-02 16:31:24 +08:00
committed by GitHub
parent fd385bce9d
commit 3344e31a92
5 changed files with 29 additions and 7 deletions
+8
View File
@@ -93,6 +93,14 @@ export default {
| ------- | -------------------------------- |
| default | 锚点位置显示内容,默认为索引字符 |
### IndexBar 方法
通过 ref 可以获取到 IndexBar 实例并调用实例方法,详见[组件实例方法](#/zh-CN/advanced-usage#zu-jian-shi-li-fang-fa)。
| 方法名 | 说明 | 参数 | 返回值 |
| ------------------ | -------------- | ------------------------- | ------ |
| scrollTo `v2.12.2` | 滚动到指定锚点 | _index: number \| string_ | - |
### 样式变量
组件提供了下列 Less 变量,可用于自定义样式,使用方法请参考[主题定制](#/zh-CN/theme)。