diff --git a/docs/project_context.md b/docs/project_context.md index ad0e739..7f32127 100644 --- a/docs/project_context.md +++ b/docs/project_context.md @@ -819,3 +819,8 @@ - CellData 图形化映射中每个来源卡片支持展开/收起,来源头展示目录与 CSV 前缀摘要;“添加来源”按钮移动到映射规则标题区右侧。 - 验证:`frontend` `npm run build` 通过;构建产物已清理。 + +## 2026-06-25:调整图形化映射添加来源位置 + +- “添加来源”按钮移动到主键表达式输入区下方右侧;点击后来源列表自动滚动到新增来源。 +- 验证:`frontend` `npm run build` 通过;构建产物已清理。 diff --git a/frontend/src/components/SettingsPanel.vue b/frontend/src/components/SettingsPanel.vue index a96c1fa..bf6a8b2 100644 --- a/frontend/src/components/SettingsPanel.vue +++ b/frontend/src/components/SettingsPanel.vue @@ -719,7 +719,6 @@
映射规则 - 添加来源 图形化 JSON @@ -742,7 +741,10 @@
-
+
+ 添加来源 +
+
@@ -900,6 +902,7 @@ const cellDataMappingText = ref(''); const cellDataMappingMode = ref<'form' | 'json'>('form'); const cellDataEditorHost = ref(null); const cellDataEditor = shallowRef(null); +const cellDataSourceListRef = ref(null); const cellDataMappingForm = reactive({ target_table: 'cellinfo', key: { @@ -1543,6 +1546,12 @@ function mappingFormToJson(): Record { function addCellDataMappingSource() { cellDataMappingForm.sources.push({ band: '', file_prefix: '', collapsed: false, fields: [] }); + void nextTick(() => { + const container = cellDataSourceListRef.value; + if (container) { + container.scrollTop = container.scrollHeight; + } + }); } function toggleCellDataMappingSource(index: number) { diff --git a/frontend/src/styles.css b/frontend/src/styles.css index 4325c4a..c61f3e8 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -1683,7 +1683,7 @@ select { .cell-data-mapping-form { min-height: 0; - grid-template-rows: auto minmax(0, 1fr) auto; + grid-template-rows: auto auto minmax(0, 1fr); } .cell-data-mapping-key { @@ -1709,7 +1709,7 @@ select { .cell-data-mapping-actions { display: flex; - justify-content: flex-start; + justify-content: flex-end; } .cell-data-source-header,