types: add FIeldInstance type (#9166)

This commit is contained in:
neverland
2021-08-02 20:42:27 +08:00
committed by GitHub
parent 5f41cb9bbd
commit ff464c12fa
5 changed files with 87 additions and 38 deletions
+13
View File
@@ -328,6 +328,19 @@ export default {
| focus | 获取输入框焦点 | - | - |
| blur | 取消输入框焦点 | - | - |
### 类型定义
通过 `FieldInstance` 获取 Field 实例的类型定义。
```ts
import { ref } from 'vue';
import type { FieldInstance } from 'vant';
const fieldRef = ref<FieldInstance>();
fieldRef.value?.focus();
```
### Slots
| 名称 | 说明 |