mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-04 12:58:38 +08:00
Merge remote-tracking branch 'amis/master'
This commit is contained in:
commit
943c63f7e4
@ -435,7 +435,9 @@ const defaultOmitList = [
|
||||
'disabled',
|
||||
'disabledOn',
|
||||
'component',
|
||||
'detectField'
|
||||
'detectField',
|
||||
'required',
|
||||
'requiredOn'
|
||||
];
|
||||
|
||||
class SchemaRenderer extends React.Component<SchemaRendererProps, any> {
|
||||
|
@ -284,7 +284,9 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
>
|
||||
<span>
|
||||
{filter(label, data)}
|
||||
{required ? <span className={cx(`Form-star`)}>*</span> : null}
|
||||
{required && (label || labelRemark) ? (
|
||||
<span className={cx(`Form-star`)}>*</span>
|
||||
) : null}
|
||||
{labelRemark
|
||||
? render('label-remark', {
|
||||
type: 'remark',
|
||||
@ -387,7 +389,9 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
<label className={cx(`Form-label`, labelClassName)}>
|
||||
<span>
|
||||
{filter(label, data)}
|
||||
{required ? <span className={cx(`Form-star`)}>*</span> : null}
|
||||
{required && (label || labelRemark) ? (
|
||||
<span className={cx(`Form-star`)}>*</span>
|
||||
) : null}
|
||||
{labelRemark
|
||||
? render('label-remark', {
|
||||
type: 'remark',
|
||||
@ -480,7 +484,9 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
<label className={cx(`Form-label`, labelClassName)}>
|
||||
<span>
|
||||
{filter(label, data)}
|
||||
{required ? <span className={cx(`Form-star`)}>*</span> : null}
|
||||
{required && (label || labelRemark) ? (
|
||||
<span className={cx(`Form-star`)}>*</span>
|
||||
) : null}
|
||||
{labelRemark
|
||||
? render('label-remark', {
|
||||
type: 'remark',
|
||||
@ -579,7 +585,9 @@ export class FormItemWrap extends React.Component<FormItemProps> {
|
||||
<label className={cx(`Form-label`, labelClassName)}>
|
||||
<span>
|
||||
{filter(label, data)}
|
||||
{required ? <span className={cx(`Form-star`)}>*</span> : null}
|
||||
{required && (label || labelRemark) ? (
|
||||
<span className={cx(`Form-star`)}>*</span>
|
||||
) : null}
|
||||
{labelRemark
|
||||
? render('label-remark', {
|
||||
type: 'remark',
|
||||
@ -854,7 +862,9 @@ export function asFormItem(config: Omit<FormItemConfig, 'component'>) {
|
||||
{
|
||||
'is-inline': !!rest.inline,
|
||||
'is-error': model && !model.valid,
|
||||
[`Form-control--withSize Form-control--size${ucFirst(controlSize)}`]:
|
||||
[`Form-control--withSize Form-control--size${ucFirst(
|
||||
controlSize
|
||||
)}`]:
|
||||
config.sizeMutable !== false &&
|
||||
typeof controlSize === 'string' &&
|
||||
!!controlSize &&
|
||||
|
Loading…
Reference in New Issue
Block a user