mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 11:38:03 +08:00
Merge branch 'master' of https://github.com/baidu/amis
This commit is contained in:
commit
7e28430b3c
@ -755,7 +755,7 @@ export class DatePicker extends React.Component<DateProps, DatePickerState> {
|
||||
<span className={`${ns}DatePicker-placeholder`}>{placeholder}</span>
|
||||
)}
|
||||
|
||||
{clearable && value ? (
|
||||
{clearable && !disabled && value ? (
|
||||
<a className={`${ns}DatePicker-clear`} onClick={this.clearValue}>
|
||||
{closeIcon}
|
||||
</a>
|
||||
|
@ -438,7 +438,7 @@ export class DateRangePicker extends React.Component<DateRangePickerProps, DateR
|
||||
<span className={`${ns}DateRangePicker-placeholder`}>{placeholder}</span>
|
||||
)}
|
||||
|
||||
{clearable && value ? (
|
||||
{clearable && !disabled && value ? (
|
||||
<a className={`${ns}DateRangePicker-clear`} onClick={this.clearValue}>
|
||||
{closeIcon}
|
||||
</a>
|
||||
|
@ -368,7 +368,7 @@ export default class RangeControl extends React.PureComponent<RangeProps, RangeS
|
||||
)
|
||||
: null}
|
||||
|
||||
{clearable && showInput ? (
|
||||
{clearable && !disabled && showInput ? (
|
||||
<a onClick={() => this.clearValue()} className={cx("InputRange-clear", {
|
||||
'is-active': (multiple ? isEqual(this.state.value, {min: min, max: max}) : this.state.value !== min)
|
||||
})}>{closeIcon}</a>
|
||||
|
@ -266,7 +266,7 @@ export default class TagControl extends React.PureComponent<TagProps, TagState>
|
||||
/>
|
||||
</div>
|
||||
|
||||
{clearable && value ? (<a onClick={this.clearValue} className={cx('TagControl-clear')}>{closeIcon}</a>) : null}
|
||||
{clearable && !disabled && value ? (<a onClick={this.clearValue} className={cx('TagControl-clear')}>{closeIcon}</a>) : null}
|
||||
{loading ? <i className={cx(`TagControl-spinner`, spinnerClassName)} /> : null}
|
||||
</div>
|
||||
|
||||
|
@ -434,7 +434,7 @@ export default class TextControl extends React.PureComponent<TextProps, TextStat
|
||||
/>
|
||||
</div>
|
||||
|
||||
{clearable && value ? (<a onClick={this.clearValue} className={cx('TextControl-clear')}>{closeIcon}</a>) : null}
|
||||
{clearable && !disabled && value ? (<a onClick={this.clearValue} className={cx('TextControl-clear')}>{closeIcon}</a>) : null}
|
||||
{loading ? <i className={cx(`TextControl-spinner`, spinnerClassName)} /> : null}
|
||||
{isOpen && filtedOptions.length ? (
|
||||
<div className={cx('TextControl-sugs')}>
|
||||
@ -498,7 +498,7 @@ export default class TextControl extends React.PureComponent<TextProps, TextStat
|
||||
onChange={this.handleNormalInputChange}
|
||||
value={typeof value === 'undefined' || value === null ? '' : typeof value === 'string' ? value : JSON.stringify(value)}
|
||||
/>
|
||||
{clearable && value ? (<a onClick={this.clearValue} className={`${ns}TextControl-clear`}>{closeIcon}</a>) : null}
|
||||
{clearable && !disabled && value ? (<a onClick={this.clearValue} className={`${ns}TextControl-clear`}>{closeIcon}</a>) : null}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user