vant/docs/markdown/vant-use-intro.en-US.md
2021-06-07 20:52:26 +08:00

527 B

Composables

Intro

Vant provide some built-in composition APIs, you can directly use these APIs for development.

Demo

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 Used to manage the countdown
useToggle Used to switch between true and false