diff --git a/fe/src/views/components/ConfigSettings/ConfigSettings.css b/fe/src/views/components/ConfigSettings/ConfigSettings.css index 928944d..9ccfe47 100644 --- a/fe/src/views/components/ConfigSettings/ConfigSettings.css +++ b/fe/src/views/components/ConfigSettings/ConfigSettings.css @@ -81,8 +81,52 @@ .degraded-alert { margin-top: 16px; } -.section-select { - width: 150px; +.config-workspace { + display: grid; + grid-template-columns: 176px minmax(0, 1fr); + align-items: start; + gap: 20px; +} +.config-submenu { + position: sticky; + top: 0; + display: grid; + gap: 6px; + align-self: start; + padding: 8px; + border: 1px solid var(--pm-border-color); + border-radius: var(--pm-radius-lg); + background: var(--pm-bg-secondary); +} +.config-submenu-item { + width: 100%; + padding: 12px 14px; + color: var(--pm-text-secondary); + text-align: left; + font: inherit; + border: 0; + border-radius: var(--pm-radius-sm); + background: transparent; + cursor: pointer; + transition: color .2s ease, background-color .2s ease; +} +.config-submenu-item:hover, +.config-submenu-item.active { + color: var(--pm-primary-color); + background: var(--el-color-primary-light-9); +} +.config-submenu-item.active { + font-weight: 600; +} +.config-main { + display: grid; + gap: 24px; + min-width: 0; +} +.selected-section-label { + color: var(--pm-primary-color); + font-size: 14px; + white-space: nowrap; } .editor-meta { display: flex; @@ -231,8 +275,24 @@ align-items: stretch; flex-direction: column; } - .section-select { - width: 100%; + .config-workspace { + grid-template-columns: 1fr; + gap: 16px; + } + .config-submenu { + position: static; + display: flex; + gap: 6px; + overflow-x: auto; + padding: 6px; + } + .config-submenu-item { + flex: 0 0 auto; + width: auto; + white-space: nowrap; + } + .selected-section-label { + white-space: normal; } .action-row .el-button, .audit-actions .el-button { @@ -295,4 +355,4 @@ align-items: stretch; flex-direction: column; } -} \ No newline at end of file +} diff --git a/fe/src/views/components/ConfigSettings/ConfigSettings.js b/fe/src/views/components/ConfigSettings/ConfigSettings.js index 10c24e8..893ee4e 100644 --- a/fe/src/views/components/ConfigSettings/ConfigSettings.js +++ b/fe/src/views/components/ConfigSettings/ConfigSettings.js @@ -135,6 +135,12 @@ export function usePage() { } } + const selectSection = value => { + if (selectedSection.value === value) return + selectedSection.value = value + loadSection() + } + const loadBackups = async () => { if (!canRollback.value) return backupsLoading.value = true @@ -426,7 +432,7 @@ export function usePage() { return { loading, working, status, stateLabel, stateTagType, sectionOptions: sections, - selectedSection, editorText, sectionError, sensitiveHint, secretField, secretValue, + selectedSection, selectSection, editorText, sectionError, sensitiveHint, secretField, secretValue, confirmed, savedGeneration, validationResult, canWrite, canRollback, canAudit, canExportAudit, backupsLoading, backups, rollbackGeneration, rollbackConfirmed, rollbackPreview, auditLoading, auditItems, loadAll, loadSection, validateConfig, saveConfig, applyConfig, diff --git a/fe/src/views/components/ConfigSettings/ConfigSettings.vue b/fe/src/views/components/ConfigSettings/ConfigSettings.vue index 652d621..2297d85 100644 --- a/fe/src/views/components/ConfigSettings/ConfigSettings.vue +++ b/fe/src/views/components/ConfigSettings/ConfigSettings.vue @@ -14,58 +14,72 @@ class="config-alert" /> -
-
-
- 运行状态 -

配置快照

-
- 刷新 -
-
-
- 状态 - {{ stateLabel }} -
-
- 当前生效代次 - {{ status.activeGeneration || '-' }} -
-
- 最近校验时间 - {{ formatTime(status.lastValidAt) }} -
-
- 待重启服务 -
- - {{ serviceLabel(service) }} - -
- 无 -
-
- -
+
+ -
-
-
- 分区配置 -

编辑候选配置

-
- - - -
+
+
+
+
+ 运行状态 +

配置快照

+
+ 刷新 +
+
+
+ 状态 + {{ stateLabel }} +
+
+ 当前生效代次 + {{ status.activeGeneration || '-' }} +
+
+ 最近校验时间 + {{ formatTime(status.lastValidAt) }} +
+
+ 待重启服务 +
+ + {{ serviceLabel(service) }} + +
+ 无 +
+
+ +
+ +
+
+
+ 分区配置 +

编辑候选配置

+
+ +
{{ issue.code }}:{{ issue.message }}
-
+ -
+
数据库迁移 @@ -172,9 +186,9 @@ 目标数据库:{{ migrationRecord.target?.name || migrationRecord.target?.localRef || '-' }} 错误代码:{{ migrationRecord.errorCode }}
-
+
-
+
受控重启 @@ -196,9 +210,9 @@ 服务管理器:{{ restartPreview.serviceManager }} {{ restartPreview.triggerAvailable ? '重启通道可用' : '重启通道暂不可用,请先检查服务部署' }}
-
+
-
+
受控回滚 @@ -231,9 +245,9 @@ 候选代次:{{ rollbackPreview.candidateGeneration }} 变更分区:{{ rollbackPreview.changedSections?.map(sectionLabel).join('、') || '无' }}
-
+
-
+
审计记录 @@ -255,7 +269,9 @@
-
+
+
+ @@ -271,6 +287,7 @@ const { stateTagType, sectionOptions, selectedSection, + selectSection, editorText, sectionError, sensitiveHint, @@ -325,4 +342,4 @@ const { void computed - \ No newline at end of file +