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