mirror of
https://github.com/youzan/vant.git
synced 2026-05-08 01:07:46 +08:00
types(Field): add focus、blur method type
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user