chore: move vant to packages folder (#9384)

This commit is contained in:
neverland
2021-09-03 14:32:16 +08:00
committed by GitHub
parent 5a75326b65
commit c21324b256
1022 changed files with 150 additions and 164 deletions
@@ -0,0 +1,24 @@
# 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 |
| --- | --- |
| [useClickAway](#/en-US/use-click-away) | Triggers a callback when user clicks outside of the target element |
| [useCountDown](#/en-US/use-count-down) | Used to manage the countdown |
| [useToggle](#/en-US/use-toggle) | Used to switch between `true` and `false` |