Merge branch 'next' into develop

This commit is contained in:
nocobase[bot] 2025-03-31 12:12:01 +00:00
commit 2dbce800d5
3 changed files with 15 additions and 3 deletions

View File

@ -1095,5 +1095,6 @@
"Font Weight": "字体粗细",
"Font Style": "字体样式",
"Italic": "斜体",
"Response record":"响应结果记录"
"Response record":"响应结果记录",
"Colon":"冒号"
}

View File

@ -50,19 +50,20 @@ const FormComponent: React.FC<FormProps> = (props) => {
labelAlign = 'left',
labelWidth = 120,
labelWrap = true,
colon = true,
} = cardItemSchema?.['x-component-props'] || {};
const { isMobileLayout } = useMobileLayout();
const newSchema = useMemo(
() => (isMobileLayout ? transformMultiColumnToSingleColumn(fieldSchema) : fieldSchema),
[fieldSchema, isMobileLayout],
);
return (
<FieldContext.Provider value={undefined}>
<FormContext.Provider value={form}>
<FormLayout
layout={layout}
{...others}
colon={colon}
labelAlign={labelAlign}
labelWidth={layout === 'horizontal' ? labelWidth : null}
labelWrap={labelWrap}

View File

@ -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
}
onSubmit={({ layout, labelAlign, labelWidth, labelWrap }) => {
onSubmit={({ layout, labelAlign, labelWidth, labelWrap, colon }) => {
const componentProps = fieldSchema['x-component-props'] || {};
componentProps.layout = layout;
componentProps.labelAlign = labelAlign;
componentProps.labelWidth = layout === 'horizontal' ? labelWidth : null;
componentProps.labelWrap = labelWrap;
componentProps.colon = colon;
fieldSchema['x-component-props'] = componentProps;
field.componentProps.layout = layout;
field.componentProps.labelAlign = labelAlign;
field.componentProps.labelWidth = labelWidth;
field.componentProps.labelWrap = labelWrap;
field.componentProps.colon = colon;
dn.emit('patch', {
schema: {
['x-uid']: fieldSchema['x-uid'],