fix(Form.Item): fix label replace regexp err replace

This commit is contained in:
shao 2019-07-30 20:57:39 +08:00
parent 2b67ca48e0
commit f0726014c3

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({