Select option 支持 tip 内容展示

This commit is contained in:
liaoxuezhi 2019-08-19 18:56:37 +08:00
parent 75cdef5310
commit 1e6e425bfc
1 changed files with 4 additions and 6 deletions

View File

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