for admin form page

This commit is contained in:
2025-10-17 14:39:35 +08:00
parent 411f068d75
commit 40a5f4e29c
10 changed files with 445 additions and 17 deletions

View File

@@ -79,10 +79,11 @@ export const addFieldLabel = async () => {
console.log(`Processed ${fieldsWithLabels.length} fields and ${spacerElements.length} spacer elements`);
labelProcessor.beforeProcess(formFields, layout, fieldsWithLabels, spacerElements);
// 字段元素
labelProcessor.processFieldLabels(fieldsWithLabels);
labelProcessor.processFieldLabels(fieldsWithLabels, layout);
// 间距元素
labelProcessor.processSpacerLabels(spacerElements);
labelProcessor.processSpacerLabels(spacerElements, layout);
} catch (error) {
console.error('Failed to add field information: ', error);

View File

@@ -12,4 +12,27 @@ export const SPACING = {
FIELD_CONTAINER_WIDTH: '100%',
};
// 样式配置常量
export const STYLES = {
BASIC_LABEL_TOP: 'calc(5px + 1rem)',
SUBTABLE_LABEL_TOP: 'calc(12px + 1rem)',
GROUP_LABEL_TOP: 'calc(20px + 1rem)',
};
// LABEL 基本样式
export const ADMIN_LABEL_STYLE = {
position: 'absolute',
zIndex: '1',
lineHeight: '1',
background: '#ffd9d9',
padding: '2px',
top: STYLES.BASIC_LABEL_TOP,
border: 'dotted red 1px',
fontSize: '0.75rem',
};
export const LABEL_STYLE = {
display: 'inline-block'
}
export let IS_FIELD_TYPE_DISPLAY = false;