feat(platform): 后管菜单平台隔离收窄+列表密度收口(2026-11-18 用户截图口径「密钥管理与密钥用量统计仅亚马逊侧;菜单配置展示树按当前平台先裁剪再展平分页」)——①双侧共用清单四件收窄:AdminMenuPlatformScope.BOTH_MENU_KEYS(后端唯一出处)与 admin platform-scope.ts BOTH_PLATFORM_MENU_KEYS 同源去掉 admin_user_secrets/admin_user_secret_usage,密钥两页京东侧不再下发也不可配;②菜单管理页:全树字典保留(授权数据不动),展示树与父级候选走 filterMenuTreeNodesByPlatform 先裁剪再展平分页,切平台清筛选回页1并关弹窗;③列表密度收口:顶栏 76→56、内容区留白 30/32→12/16、筛选行 flex 换行紧凑、表格行距 6px、按钮/输入 34px 同高,三档响应式断点(1440/820/560,窄屏菜单项不再整体隐藏);task-243 顶栏 56px 断言随行、task-244 新钉六条紧凑断言与「窄屏不许 display:none 菜单项」反向钉。判据:AdminMenuPlatformScopeTest 11+AdminConsoleCurrentUserMenusPlatformTest 3(后端点名绿)+vue-tsc rc0+node --test 35+npx vitest run 全量 188/188 rc0(新增 menu-manage-platform.mount 3 支:京东侧菜单配置页无亚马逊项、保留账号域四件与京东工具、密钥页归亚马逊)+快检 overall=pass 四面绿(2026-11-18 12:5x,Git PATH 前置壳)

This commit is contained in:
zwork
2026-11-18 12:47:39 +08:00
parent 917884aa6d
commit 84c664c795
12 changed files with 302 additions and 43 deletions
+4 -4
View File
@@ -2,13 +2,13 @@ import test from 'node:test'
import assert from 'node:assert/strict'
import { readSource } from './helpers.ts'
// module 13 task 243:壳层换皮成 admin.html 蓝白浅色 —— 侧栏 252px 浅底、顶栏 76px、
// module 13 task 243:壳层换皮成 admin.html 蓝白浅色 —— 侧栏 252px 浅底、顶栏 56px、
// 角色胶囊 + 次级退出按钮、去掉顶栏重复 logo、菜单激活态浅蓝渐变+左蓝条。
test('test_task_243_shell_normal_primary_path', () => {
const css = readSource('src/styles/main.css')
assert.match(css, /\.admin-sidebar\s*\{[^}]*flex:\s*0\s*0\s*252px/, '侧栏宽度应为 252px')
assert.match(css, /\.admin-topbar\s*\{[^}]*min-height:\s*76px/, '顶栏高度应为 76px')
assert.match(css, /\.admin-topbar\s*\{[^}]*min-height:\s*56px/, '顶栏高度应为 56px')
assert.match(css, /linear-gradient\(180deg,\s*var\(--admin-sidebar\)\s*0%,/, '侧栏应为浅色渐变底')
// 壳层锁视口高(2026-11-18「菜单加个滚动条」绊线):.admin-shell 必须 height:100vh +
// overflow:hidden——侧边栏固定、菜单区 el-scrollbar 与内容区 overflow:auto 才能各自独立滚动;
@@ -28,8 +28,8 @@ test('test_task_243_shell_normal_variant_input', () => {
test('test_task_243_shell_normal_repeated_operation_is_idempotent', () => {
const css = readSource('src/styles/main.css')
const first = /\.admin-topbar\s*\{[^}]*min-height:\s*76px/.test(css)
const second = /\.admin-topbar\s*\{[^}]*min-height:\s*76px/.test(css)
const first = /\.admin-topbar\s*\{[^}]*min-height:\s*56px/.test(css)
const second = /\.admin-topbar\s*\{[^}]*min-height:\s*56px/.test(css)
assert.equal(first, true)
assert.equal(first, second)
})