types(Field): add focus、blur method type

This commit is contained in:
陈嘉涵
2019-12-22 17:13:33 +08:00
committed by neverland
parent 5c1883f77c
commit 0b5c8e5f3d
3 changed files with 12 additions and 2 deletions
+2
View File
@@ -83,12 +83,14 @@ export default createComponent({
},
methods: {
// @exposed-api
focus() {
if (this.$refs.input) {
this.$refs.input.focus();
}
},
// @exposed-api
blur() {
if (this.$refs.input) {
this.$refs.input.blur();