Skip to content

Commit

Permalink
fix: password add focus blur methods #1485
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Dec 9, 2019
1 parent d294328 commit 843d9dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions components/input/Password.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ export default {
};
},
methods: {
focus() {
this.$refs.input.focus();
},
blur() {
this.$refs.input.blur();
},
onChange() {
this.setState({
visible: !this.visible,
Expand Down Expand Up @@ -85,6 +91,7 @@ export default {
type: this.visible ? 'text' : 'password',
},
class: inputClassName,
ref: 'input',
on: this.$listeners,
};
return <Input {...inputProps} />;
Expand Down

0 comments on commit 843d9dc

Please sign in to comment.