diff --git a/scss/components/form/_tag.scss b/scss/components/form/_tag.scss index ba786937..855d4192 100644 --- a/scss/components/form/_tag.scss +++ b/scss/components/form/_tag.scss @@ -5,6 +5,11 @@ border-radius: 0; } + &-input.is-disabled { + border-style: dashed; + background: transparent; + } + &.is-inline { display: inline-block; } diff --git a/src/components/ResultBox.tsx b/src/components/ResultBox.tsx index 6ab81481..9e9b794a 100644 --- a/src/components/ResultBox.tsx +++ b/src/components/ResultBox.tsx @@ -128,7 +128,7 @@ export class ResultBox extends React.Component { onResultClick ? 'is-clickable' : '' )} onClick={onResultClick} - tabIndex={!allowInput && onFocus ? 0 : -1} + tabIndex={!allowInput && !disabled && onFocus ? 0 : -1} onKeyPress={allowInput ? undefined : onKeyPress} onFocus={allowInput ? undefined : onFocus} onBlur={allowInput ? undefined : onBlur} @@ -139,20 +139,22 @@ export class ResultBox extends React.Component { {itemRender(item)} - - - + {!disabled ? ( + + + + ) : null} )) ) : result && !Array.isArray(result) ? ( {result} - ) : allowInput ? null : ( + ) : allowInput && !disabled ? null : ( {__(placeholder || '无')} )} - {allowInput ? ( + {allowInput && !disabled ? (