fix: password add focus blur methods #1485

This commit is contained in:
tangjinzhou 2019-12-09 22:44:52 +08:00
parent d294328319
commit 843d9dc82f

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} />;