docs: translate useToggle (#8822)

This commit is contained in:
neverland
2021-06-07 20:52:26 +08:00
committed by GitHub
parent 026a1094c5
commit b3eec95bcd
3 changed files with 132 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
# Composables
### Intro
Vant provide some built-in composition APIs, you can directly use these APIs for development.
### Demo
```js
import { useWindowSize } from '@vant/use';
const { width, height } = useWindowSize();
console.log(width.value); // -> window width
console.log(height.value); // -> window height
```
### API List
| Name | Description |
| --- | --- |
| [useCountDown](#/en-US/use-count-down) | Used to manage the countdown |
| [useToggle](#/en-US/use-toggle) | Used to switch between `true` and `false` |