样式调整

This commit is contained in:
2betop 2020-06-12 11:44:04 +08:00
parent d3d8905299
commit 402dd1a9c3
3 changed files with 25 additions and 5 deletions

View File

@ -41,13 +41,25 @@
&-toolbar { &-toolbar {
margin-top: $gap-sm; margin-top: $gap-sm;
&--dnd {
padding-left: 29px;
}
display: flex;
flex-direction: row;
justify-content: space-between;
}
&-sortTip {
color: $text--muted-color;
} }
&-item { &-item {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: flex-start; align-items: flex-start;
margin-bottom: $gap-sm; margin-bottom: $gap-xs;
> div { > div {
flex-grow: 1; flex-grow: 1;

View File

@ -194,7 +194,14 @@ export class ArrayInput extends React.Component<ArrayInputProps> {
<div className={cx('ArrayInput-placeholder')}>{__(placeholder)}</div> <div className={cx('ArrayInput-placeholder')}>{__(placeholder)}</div>
)} )}
<div className={cx('ArrayInput-toolbar')}> <div
className={cx(
'ArrayInput-toolbar',
sortable && Array.isArray(value) && value.length > 1
? 'ArrayInput-toolbar--dnd'
: ''
)}
>
{!Array.isArray(value) || !maxLength || value.length < maxLength ? ( {!Array.isArray(value) || !maxLength || value.length < maxLength ? (
<Button <Button
className={cx('ArrayInput-addBtn')} className={cx('ArrayInput-addBtn')}
@ -208,7 +215,7 @@ export class ArrayInput extends React.Component<ArrayInputProps> {
) : null} ) : null}
{sortable && Array.isArray(value) && value.length ? ( {sortable && Array.isArray(value) && value.length ? (
<span className={cx(`Combo-dragableTip`)} ref={this.dragTipRef}> <span className={cx(`ArrayInput-sortTip`)} ref={this.dragTipRef}>
{Array.isArray(value) && value.length > 1 ? __(sortTip) : ''} {Array.isArray(value) && value.length > 1 ? __(sortTip) : ''}
</span> </span>
) : null} ) : null}

View File

@ -30,7 +30,8 @@ export class NumberInput extends React.Component<NumberProps, any> {
max, max,
min, min,
disabled, disabled,
placeholder placeholder,
onChange
} = this.props; } = this.props;
let precisionProps: any = {}; let precisionProps: any = {};
@ -47,7 +48,7 @@ export class NumberInput extends React.Component<NumberProps, any> {
step={step} step={step}
max={max} max={max}
min={min} min={min}
onChange={onchange} onChange={onChange}
disabled={disabled} disabled={disabled}
placeholder={placeholder} placeholder={placeholder}
{...precisionProps} {...precisionProps}