fix: password add focus blur methods #1485

pull/1534/head
tangjinzhou 2019-12-09 22:44:52 +08:00
parent d294328319
commit 843d9dc82f
1 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,12 @@ export default {
};
},
methods: {
focus() {
this.$refs.input.focus();
},
blur() {
this.$refs.input.blur();
},
onChange() {
this.setState({
visible: !this.visible,
@ -85,6 +91,7 @@ export default {
type: this.visible ? 'text' : 'password',
},
class: inputClassName,
ref: 'input',
on: this.$listeners,
};
return <Input {...inputProps} />;