improve auto colon of FormItem

This commit is contained in:
afc163 2016-06-15 18:15:47 +08:00
parent e91313efc1
commit 06f472a728

View File

@ -164,7 +164,7 @@ export default class FormItem extends React.Component {
// remove user input colon
let label = props.label;
if (typeof props.label === 'string') {
if (typeof label === 'string' && label.trim() !== '') {
label = props.label.replace(/|:$/, '');
}