types(CountDown): add CountDownInstance type (#9153)

* types(CountDown): add CountDownInstance type

* chore: fix snapshot
This commit is contained in:
neverland
2021-07-29 15:34:08 +08:00
committed by GitHub
parent 8a0f7ff3f0
commit 44fb849a5f
6 changed files with 83 additions and 26 deletions
+13
View File
@@ -181,6 +181,19 @@ Use [ref](https://v3.vuejs.org/guide/component-template-refs.html) to get CountD
| pause | Pause count down | - | - |
| reset | Reset count down | - | - |
### Types
Get the type definition of the CountDown instance through `CountDownInstance`.
```ts
import { ref } from 'vue';
import type { CountDownInstance } from 'vant';
const countDownRef = ref<CountDownInstance>();
countDownRef.value?.start();
```
### 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).