docs: add documentation of all typings (#9359)

This commit is contained in:
neverland
2021-08-31 15:51:38 +08:00
committed by GitHub
parent 43b78002d3
commit 317035e9f5
129 changed files with 661 additions and 79 deletions
+10 -2
View File
@@ -75,7 +75,7 @@ export default {
| z-index | z-index | _number \| string_ | `1` |
| sticky | Whether to enable anchor sticky top | _boolean_ | `true` |
| sticky-offset-top | Anchor offset top when sticky | _number_ | `0` |
| highlight-color | Index character highlight color | _string_ | `#ee0a24` | - |
| highlight-color | Index character highlight color | _string_ | `#ee0a24` |
| teleport `v3.0.19` | Specifies a target element where IndexBar will be mounted | _string \| Element_ | - |
### IndexAnchor Props
@@ -101,7 +101,13 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get IndexB
### Types
Get the type definition of the IndexBar instance through `IndexBarInstance`.
The component exports the following type definitions:
```ts
import type { IndexBarInstance } from 'vant';
```
`IndexBarInstance` is the type of component instance:
```ts
import { ref } from 'vue';
@@ -118,6 +124,8 @@ indexBarRef.value?.scrollTo('B');
| ------- | ------------------------------------- |
| default | Anchor content, show index by default |
## Theming
### CSS Variables
The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/config-provider).