diff --git a/apps/jingrow/frontend/src/core/components/form/controls/Icon.vue b/apps/jingrow/frontend/src/core/components/form/controls/Icon.vue index 5fe2093..660921f 100644 --- a/apps/jingrow/frontend/src/core/components/form/controls/Icon.vue +++ b/apps/jingrow/frontend/src/core/components/form/controls/Icon.vue @@ -1,11 +1,17 @@ @@ -14,11 +20,27 @@ const labelLayout = computed(() => props.df.label_layout || 'vertical') {{ ctx.t(df.label || df.fieldname) }} * - + + + + + + — + + + + + + {{ iconValue || '—' }} + + + + + @@ -26,6 +48,45 @@ const labelLayout = computed(() => props.df.label_layout || 'vertical') .field-wrapper :deep(.n-input) { flex: 1; } + +.icon-field-content { + display: flex; + align-items: center; + gap: 12px; + flex: 1; +} + +.icon-display { + display: flex; + align-items: center; + justify-content: center; + min-width: 32px; + width: 32px; + height: 32px; + flex-shrink: 0; +} + +.icon-gray { + color: #9ca3af; +} + +.icon-placeholder { + color: #9ca3af; + font-size: 14px; +} + +.icon-value-display { + flex: 1; + min-width: 0; +} + +.field-value-text { + color: #111827; + font-size: 14px; + min-height: 32px; + display: flex; + align-items: center; +} diff --git a/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue b/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue index 44055b2..5a7c0ce 100644 --- a/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue +++ b/apps/jingrow/frontend/src/core/pagetype/GenericListPage.vue @@ -154,6 +154,9 @@ ✓ ○ + + + {{ formatDisplayValue(row[f.key], f.key) }} @@ -241,6 +244,9 @@ ✓ ○ + + + f.fieldname === fieldName) + return fieldMeta?.fieldtype === 'Icon' +} + // Select字段颜色配置映射(柔和、低饱和度) // 格式:{ fieldName: { value: color } } 或 { 'global': { value: color } } 用于所有Select字段 // 推荐使用柔和颜色,如:'#e0f2fe'(浅蓝)、'#dcfce7'(浅绿)等 @@ -1738,6 +1751,11 @@ function formatDisplayValue(value: any, fieldName: string) { font-size: 16px; } +/* Icon 字段图标样式 - 灰色系 */ +.icon-gray { + color: #9ca3af; +} + /* 列表列通用样式 - 确保垂直居中 */ .list-header > div:not(.col-checkbox), .list-item > div:not(.col-checkbox):not(.col-actions) {