mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-07 22:49:26 +08:00
Merge branch 'next' into develop
This commit is contained in:
commit
2dbce800d5
@ -1095,5 +1095,6 @@
|
|||||||
"Font Weight": "字体粗细",
|
"Font Weight": "字体粗细",
|
||||||
"Font Style": "字体样式",
|
"Font Style": "字体样式",
|
||||||
"Italic": "斜体",
|
"Italic": "斜体",
|
||||||
"Response record":"响应结果记录"
|
"Response record":"响应结果记录",
|
||||||
|
"Colon":"冒号"
|
||||||
}
|
}
|
||||||
|
@ -50,19 +50,20 @@ const FormComponent: React.FC<FormProps> = (props) => {
|
|||||||
labelAlign = 'left',
|
labelAlign = 'left',
|
||||||
labelWidth = 120,
|
labelWidth = 120,
|
||||||
labelWrap = true,
|
labelWrap = true,
|
||||||
|
colon = true,
|
||||||
} = cardItemSchema?.['x-component-props'] || {};
|
} = cardItemSchema?.['x-component-props'] || {};
|
||||||
const { isMobileLayout } = useMobileLayout();
|
const { isMobileLayout } = useMobileLayout();
|
||||||
const newSchema = useMemo(
|
const newSchema = useMemo(
|
||||||
() => (isMobileLayout ? transformMultiColumnToSingleColumn(fieldSchema) : fieldSchema),
|
() => (isMobileLayout ? transformMultiColumnToSingleColumn(fieldSchema) : fieldSchema),
|
||||||
[fieldSchema, isMobileLayout],
|
[fieldSchema, isMobileLayout],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FieldContext.Provider value={undefined}>
|
<FieldContext.Provider value={undefined}>
|
||||||
<FormContext.Provider value={form}>
|
<FormContext.Provider value={form}>
|
||||||
<FormLayout
|
<FormLayout
|
||||||
layout={layout}
|
layout={layout}
|
||||||
{...others}
|
{...others}
|
||||||
|
colon={colon}
|
||||||
labelAlign={labelAlign}
|
labelAlign={labelAlign}
|
||||||
labelWidth={layout === 'horizontal' ? labelWidth : null}
|
labelWidth={layout === 'horizontal' ? labelWidth : null}
|
||||||
labelWrap={labelWrap}
|
labelWrap={labelWrap}
|
||||||
|
@ -107,20 +107,30 @@ export const SchemaSettingsLayoutItem = function LayoutItem() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
colon: {
|
||||||
|
type: 'boolean',
|
||||||
|
'x-content': t('Colon'),
|
||||||
|
required: true,
|
||||||
|
default: fieldSchema?.['x-component-props']?.colon !== false,
|
||||||
|
'x-decorator': 'FormItem',
|
||||||
|
'x-component': 'Checkbox',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
} as ISchema
|
} as ISchema
|
||||||
}
|
}
|
||||||
onSubmit={({ layout, labelAlign, labelWidth, labelWrap }) => {
|
onSubmit={({ layout, labelAlign, labelWidth, labelWrap, colon }) => {
|
||||||
const componentProps = fieldSchema['x-component-props'] || {};
|
const componentProps = fieldSchema['x-component-props'] || {};
|
||||||
componentProps.layout = layout;
|
componentProps.layout = layout;
|
||||||
componentProps.labelAlign = labelAlign;
|
componentProps.labelAlign = labelAlign;
|
||||||
componentProps.labelWidth = layout === 'horizontal' ? labelWidth : null;
|
componentProps.labelWidth = layout === 'horizontal' ? labelWidth : null;
|
||||||
componentProps.labelWrap = labelWrap;
|
componentProps.labelWrap = labelWrap;
|
||||||
|
componentProps.colon = colon;
|
||||||
fieldSchema['x-component-props'] = componentProps;
|
fieldSchema['x-component-props'] = componentProps;
|
||||||
field.componentProps.layout = layout;
|
field.componentProps.layout = layout;
|
||||||
field.componentProps.labelAlign = labelAlign;
|
field.componentProps.labelAlign = labelAlign;
|
||||||
field.componentProps.labelWidth = labelWidth;
|
field.componentProps.labelWidth = labelWidth;
|
||||||
field.componentProps.labelWrap = labelWrap;
|
field.componentProps.labelWrap = labelWrap;
|
||||||
|
field.componentProps.colon = colon;
|
||||||
dn.emit('patch', {
|
dn.emit('patch', {
|
||||||
schema: {
|
schema: {
|
||||||
['x-uid']: fieldSchema['x-uid'],
|
['x-uid']: fieldSchema['x-uid'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user