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

@@ -4,7 +4,7 @@
*/
import { FIELD_TYPES } from '../../utils/constants.js';
import { COLORS, SPACING, IS_FIELD_TYPE_DISPLAY } from '../../features/add-field-label/settings.js';
import { COLORS, SPACING, IS_FIELD_TYPE_DISPLAY, LABEL_STYLE } from '../../features/add-field-label/settings.js';
/**
* 创建带有适当样式的字段标签 span 元素
@@ -53,7 +53,8 @@ const createFieldSpanElement = ({ code, type, width }) => {
*/
export const createFieldWithLabels = ({ code, type, width }) => {
const container = document.createElement('div');
container.style.display = 'inline-block'; // 布局的内联块显示
// container.style.display = 'inline-block'; // 布局的内联块显示
Object.assign(container.style, LABEL_STYLE)
const fieldSpan = createFieldSpanElement({ code, type, width });
container.appendChild(fieldSpan);

View File

@@ -39,6 +39,10 @@ export class FieldLabelProcessor {
return false;
}
beforeProcess(rawFieldsMap, rawLayout, fields, spacers) {
}
/**
* 为子表字段元素添加标签
* @param {Object} field - 字段配置信息