Browse Source

fix: input search style bug #2077 (#2081)

close #2077
pull/2098/head
zkwolf 5 years ago committed by GitHub
parent
commit
dc8306bea9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      components/input/ClearableLabeledInput.jsx
  2. 1
      components/input/Input.jsx
  3. 2
      components/input/Search.jsx
  4. 1
      components/input/inputProps.js

1
components/input/ClearableLabeledInput.jsx

@ -93,6 +93,7 @@ const ClearableLabeledInput = {
[`${prefixCls}-affix-wrapper-input-with-clear-btn`]: [`${prefixCls}-affix-wrapper-input-with-clear-btn`]:
props.suffix && props.allowClear && this.$props.value, props.suffix && props.allowClear && this.$props.value,
}); });
return ( return (
<span class={affixWrapperCls} style={props.style}> <span class={affixWrapperCls} style={props.style}>
{prefix} {prefix}

1
components/input/Input.jsx

@ -136,6 +136,7 @@ export default {
'lazy', 'lazy',
'size', 'size',
'inputType', 'inputType',
'className',
]); ]);
const { stateValue, handleKeyDown, handleChange, size, disabled } = this; const { stateValue, handleKeyDown, handleChange, size, disabled } = this;
const inputProps = { const inputProps = {

2
components/input/Search.jsx

@ -170,9 +170,9 @@ export default {
prefix: getComponentFromProp(this, 'prefix'), prefix: getComponentFromProp(this, 'prefix'),
addonAfter: this.renderAddonAfter(prefixCls), addonAfter: this.renderAddonAfter(prefixCls),
addonBefore, addonBefore,
className: inputClassName,
}, },
attrs: this.$attrs, attrs: this.$attrs,
class: inputClassName,
ref: 'input', ref: 'input',
on: { on: {
pressEnter: this.onSearch, pressEnter: this.onSearch,

1
components/input/inputProps.js

@ -32,4 +32,5 @@ export default {
}, },
maxLength: PropTypes.number, maxLength: PropTypes.number,
loading: PropTypes.bool, loading: PropTypes.bool,
className: PropTypes.string,
}; };

Loading…
Cancel
Save