Merge pull request #17985 from shaodahong/fix-form-item-label-regexp

fix(Form.Item): fix label replace regexp err replace
This commit is contained in:
偏右 2019-07-31 11:20:08 +08:00 committed by GitHub
commit ef8a6c6df8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -357,7 +357,7 @@ export default class FormItem extends React.Component<FormItemProps, any> {
const haveColon = computedColon && !vertical;
// Remove duplicated user input colon
if (haveColon && typeof label === 'string' && (label as string).trim() !== '') {
labelChildren = (label as string).replace(/[|:]\s*$/, '');
labelChildren = (label as string).replace(/[:]\s*$/, '');
}
const labelClassName = classNames({