diff --git a/src/factory.tsx b/src/factory.tsx index bd97aa1b0..1ec9f61a2 100644 --- a/src/factory.tsx +++ b/src/factory.tsx @@ -435,7 +435,9 @@ const defaultOmitList = [ 'disabled', 'disabledOn', 'component', - 'detectField' + 'detectField', + 'required', + 'requiredOn' ]; class SchemaRenderer extends React.Component { diff --git a/src/renderers/Form/Item.tsx b/src/renderers/Form/Item.tsx index f4a4c7c5c..140702141 100644 --- a/src/renderers/Form/Item.tsx +++ b/src/renderers/Form/Item.tsx @@ -284,7 +284,9 @@ export class FormItemWrap extends React.Component { > {filter(label, data)} - {required ? * : null} + {required && (label || labelRemark) ? ( + * + ) : null} {labelRemark ? render('label-remark', { type: 'remark', @@ -387,7 +389,9 @@ export class FormItemWrap extends React.Component {