Skip to content

Commit 6893848

Browse files
committed
style: format password
1 parent 725a7f5 commit 6893848

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

components/input/Password.jsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const ActionMap = {
1313

1414
export default {
1515
name: 'AInputPassword',
16+
mixins: [BaseMixin],
1617
model: {
1718
prop: 'value',
1819
event: 'change.value',
@@ -29,7 +30,6 @@ export default {
2930
visible: false,
3031
};
3132
},
32-
mixins: [BaseMixin],
3333
methods: {
3434
onChange() {
3535
this.setState({
@@ -58,7 +58,14 @@ export default {
5858
},
5959
},
6060
render() {
61-
const { prefixCls, inputPrefixCls, size, suffix, visibilityToggle, ...restProps } = getOptionProps(this);
61+
const {
62+
prefixCls,
63+
inputPrefixCls,
64+
size,
65+
suffix,
66+
visibilityToggle,
67+
...restProps
68+
} = getOptionProps(this);
6269
const suffixIcon = visibilityToggle && this.getIcon();
6370
const inputClassName = classNames(prefixCls, {
6471
[`${prefixCls}-${size}`]: !!size,
@@ -78,14 +85,8 @@ export default {
7885
type: this.visible ? 'text' : 'password',
7986
},
8087
class: inputClassName,
81-
on: {
82-
...this.$listeners,
83-
},
88+
on: this.$listeners,
8489
};
85-
return (
86-
<Input
87-
{...inputProps}
88-
/>
89-
);
90+
return <Input {...inputProps} />;
9091
},
9192
};

0 commit comments

Comments
 (0)