style: format password

pull/1311/head
tanjinzhou 2019-10-17 18:49:33 +08:00
parent 725a7f516f
commit 6893848eb0
1 changed files with 11 additions and 10 deletions

View File

@ -13,6 +13,7 @@ const ActionMap = {
export default {
name: 'AInputPassword',
mixins: [BaseMixin],
model: {
prop: 'value',
event: 'change.value',
@ -29,7 +30,6 @@ export default {
visible: false,
};
},
mixins: [BaseMixin],
methods: {
onChange() {
this.setState({
@ -58,7 +58,14 @@ export default {
},
},
render() {
const { prefixCls, inputPrefixCls, size, suffix, visibilityToggle, ...restProps } = getOptionProps(this);
const {
prefixCls,
inputPrefixCls,
size,
suffix,
visibilityToggle,
...restProps
} = getOptionProps(this);
const suffixIcon = visibilityToggle && this.getIcon();
const inputClassName = classNames(prefixCls, {
[`${prefixCls}-${size}`]: !!size,
@ -78,14 +85,8 @@ export default {
type: this.visible ? 'text' : 'password',
},
class: inputClassName,
on: {
...this.$listeners,
},
on: this.$listeners,
};
return (
<Input
{...inputProps}
/>
);
return <Input {...inputProps} />;
},
};