[improvement] Field: add focus method (#1987)

This commit is contained in:
neverland
2018-10-27 20:04:25 +08:00
committed by GitHub
parent a995c203dc
commit 7685ecd254
4 changed files with 16 additions and 0 deletions

View File

@@ -127,6 +127,10 @@ export default create({
},
methods: {
focus() {
this.$refs.input && this.$refs.input.focus();
},
blur() {
this.$refs.input && this.$refs.input.blur();
},