mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
docs: translate useToggle (#8822)
This commit is contained in:
23
docs/markdown/vant-use-intro.en-US.md
Normal file
23
docs/markdown/vant-use-intro.en-US.md
Normal 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` |
|
Reference in New Issue
Block a user