Select option 支持 tip 内容展示

This commit is contained in:
liaoxuezhi 2019-08-19 18:56:37 +08:00
parent 75cdef5310
commit 1e6e425bfc

View File

@ -537,13 +537,11 @@ export class Select extends React.Component<SelectProps, SelectState> {
? item[labelField]
: highlight(item[labelField], inputValue as string, cx('Select-option-hl'))}
</Checkbox>
) : item.isNew ? (
promptTextCreator(item.label as string)
) : (
item.isNew
? promptTextCreator(item.label as string)
: item.disabled
? item[labelField]
: highlight(item[labelField], inputValue as string, cx('Select-option-hl'))
)}
<span>{item.disabled ? item.label : highlight(item[labelField], inputValue as string, cx('Select-option-hl'))}{item.tip}</span>
)}
</div>
)})
) : (