types(CountDown): add CountDownInstance type (#9153)
* types(CountDown): add CountDownInstance type * chore: fix snapshot
This commit is contained in:
@@ -191,6 +191,19 @@ export default {
|
||||
| pause | 暂停倒计时 | - | - |
|
||||
| reset | 重设倒计时,若 `auto-start` 为 `true`,重设后会自动开始倒计时 | - | - |
|
||||
|
||||
### 类型定义
|
||||
|
||||
通过 `CountDownInstance` 获取 CountDown 实例的类型定义。
|
||||
|
||||
```ts
|
||||
import { ref } from 'vue';
|
||||
import type { CountDownInstance } from 'vant';
|
||||
|
||||
const countDownRef = ref<CountDownInstance>();
|
||||
|
||||
countDownRef.value?.start();
|
||||
```
|
||||
|
||||
### 样式变量
|
||||
|
||||
组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/config-provider)。
|
||||
|
||||
Reference in New Issue
Block a user