From 680c4bade618505d37e858b7a98b3c9272453dfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Wed, 14 Oct 2026 18:34:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(admin):=20=E5=93=81=E7=89=8C=E5=8D=A1?= =?UTF-8?q?=E5=A5=97=E8=A7=86=E8=A7=89=E5=9F=BA=E7=BA=BF=EF=BC=88Batch=201?= =?UTF-8?q?=20=E6=94=B6=E5=8F=A3=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 品牌表单 ElCard → ConfigCard(图标/副标题/信息条/footer/danger 行); 表单双列 grid(标题|主色、WhatsApp|邮箱 同排;头像/欢迎语/话题/占位/隐私 span-2); 保存备注移 footer-right、重置出厂移 #danger(既有 resetting/onResetBrand 逻辑不动) - 预览卡头加副标题「本地简化预览(真机效果以嵌入站点为准)」(cc-subtitle 观感) - CredsPane 挂载处补 @navigate=onGroupSelect 接线;email 卡 info 去「带 • 的」前缀 (push/ai 卡核实无该串);头注释同步收口 - 剪除 pane 条件链尾部 v-else 占位死分支(activeGroupLabel/ALL_NAV_ITEMS/ .placeholder-card/.save-bar 等配套同清) - form-grid 样式与 CredsPane 同款规则就地复用(不建共用文件) Co-Authored-By: Claude Code --- admin/src/views/config/center/CredsPane.vue | 4 +- admin/src/views/config/center/index.vue | 310 ++++++++++---------- 2 files changed, 151 insertions(+), 163 deletions(-) diff --git a/admin/src/views/config/center/CredsPane.vue b/admin/src/views/config/center/CredsPane.vue index 17e51b6..74a5733 100644 --- a/admin/src/views/config/center/CredsPane.vue +++ b/admin/src/views/config/center/CredsPane.vue @@ -19,7 +19,7 @@ 前缀被其他租户占用的 400 detail 内联展示 - Task 5 视觉基线:三卡套 ConfigCard(图标/副标题/信息条/footer/danger 行);footer-left「出问题?回滚 →」emit navigate('versions')(父层 - 接线在后续任务);表单区双列 grid + index.vue 已接线);表单区双列 grid --> - - - - - @@ -515,6 +524,7 @@ uploadBrandAvatar, type BrandGroupValue } from '@/api/config' + import ConfigCard from './ConfigCard.vue' import PromptsPane from './PromptsPane.vue' import WallPane from './WallPane.vue' import CredsPane from './CredsPane.vue' @@ -575,12 +585,6 @@ sub: '改坏了?这里一键回滚' } - /** 全部导航项扁平表(activeGroupLabel / 查找用) */ - const ALL_NAV_ITEMS: NavItem[] = [ - ...NAV_SECTIONS.flatMap((s) => s.items), - VERSIONS_NAV - ] - /** 通用 JSON 组(终审 I-1:contact/engine/misc 走 JsonGroupPane 一份实现) */ const JSON_GROUPS = new Set(['contact', 'engine', 'misc']) @@ -597,10 +601,6 @@ activeGroup.value = index as GroupKey } - const activeGroupLabel = computed( - () => ALL_NAV_ITEMS.find((i) => i.key === activeGroup.value)?.label ?? '' - ) - // ---- 租户上下文(超管可切换;租户管理员固定自己——useTenantOptions 收拢) ---------------- const authStore = useAuthStore() @@ -1056,32 +1056,23 @@ .form-card { flex: 1; min-width: 0; + } - .card-header { - display: flex; - align-items: baseline; - justify-content: space-between; - gap: 12px; + // 表单区双列 grid(span-2 = 独占整行:头像/多选/长文本)——与 CredsPane 同款规则 + .form-grid { + display: grid; + grid-template-columns: 1fr 1fr; + column-gap: 16px; - .card-title { - font-weight: 600; - } - - .card-sub { - font-size: 12px; - color: var(--art-gray-400); - } - - // 头部右列:副标题 + 重置出厂小按钮(Task 7d) - .header-side { - display: flex; - align-items: center; - gap: 10px; - flex-shrink: 0; - } + .span-2 { + grid-column: span 2; } } + .comment-input { + width: 220px; + } + .color-row { display: flex; gap: 8px; @@ -1152,12 +1143,6 @@ font-family: ui-monospace, SFMono-Regular, Consolas, monospace; } - .save-bar { - display: flex; - justify-content: flex-end; - margin-top: 8px; - } - // ---- 右列:预览 + 嵌入 -------------------------------------------------------------- .side-col { @@ -1179,6 +1164,13 @@ font-weight: 600; } + // 预览卡标题下方副标题(Task 6——观感同 ConfigCard 的 cc-subtitle) + .card-subtitle { + margin: 2px 0 0; + font-size: 12px; + color: var(--art-gray-500, var(--el-text-color-secondary)); + } + .card-sub { font-size: 12px; color: var(--art-gray-400); @@ -1373,10 +1365,6 @@ color: var(--art-gray-400); } - .placeholder-card { - flex: 1; - } - // ---- 提示词/词表 pane 容器(Task 7b) ------------------------------------------------ .group-pane {