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
+13 -1
View File
@@ -193,7 +193,17 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get Dropdo
### Types
Get the type definition of the DropdownItem instance through `DropdownItemInstance`.
The component exports the following type definitions:
```ts
import type {
DropdownItemOption,
DropdownItemInstance,
DropdownMenuDirection,
} from 'vant';
```
`DropdownItemInstance` is the type of component instance:
```ts
import { ref } from 'vue';
@@ -212,6 +222,8 @@ dropdownItemRef.value?.toggle();
| value | Value | _number \| string_ |
| icon | Left icon | _string_ |
## 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).