feat: 合并代码后 系统设置 ui样式优化、bug修复、全局统一图标对齐等

This commit is contained in:
zhanjunhao
2026-11-10 17:27:36 +08:00
parent 43e7fbc20e
commit 6ea8a0f7c2
195 changed files with 3546 additions and 1984 deletions
+18 -3
View File
@@ -188,7 +188,11 @@ function labelProps(label) {
typeof label === 'object' &&
!React.isValidElement(label) &&
'text' in label
? { label: label.text, required: label.required, htmlFor: label.name }
? {
label: label.text,
required: label.required,
...(label.name ? { htmlFor: label.name } : {}),
}
: { label };
}
@@ -273,16 +277,27 @@ export function withField(
if (error) throw new Error(String(error));
},
});
const fieldLabel = labelProps(label);
const control =
field === undefined && props.children && Component === Controls.Input ? (
props.children
) : (
<Component {...props} ref={ref} style={style} />
<Component
{...props}
id={props.id ?? fieldLabel.htmlFor}
ref={ref}
style={style}
/>
);
// Unnamed slots remain controlled by the page; named fields use Ant Form's store.
return (
<AntForm.Item
{...(noLabel ? {} : labelProps(label))}
{...(noLabel
? {}
: {
...fieldLabel,
...(control?.props?.id ? { htmlFor: control.props.id } : {}),
})}
name={field === undefined ? undefined : fieldPath(field)}
initialValue={initValue}
rules={normalizedRules}