提交
This commit is contained in:
1 parent
b4a49183db
commit
33c038b8d9
37 files changed
+749
No files matched your search
@@ -0,0 +1,68 @@
|
||||
# Portal 顶栏全量导航 — Implementation Plan
|
||||
|
||||
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||
|
||||
**Goal:** 去掉 Portal 左侧栏,一级模块改为顶栏下拉,二三级改为顶栏水平菜单(ellipsis),≤800px 用抽屉导航。
|
||||
|
||||
**Architecture:** 复用 `filterPortalTopModules` / `filterSidebarRoutes` 与 `ArtHorizontalMenu`;新建 `ArtPortalModuleSelect`、`ArtPortalSubNav`、`ArtPortalMobileMenu`;布局仅保留 `#app-workspace` 全宽;WorkTab 空标签落点按当前一级模块 children 解析。
|
||||
|
||||
**Tech Stack:** Vue 3 · Element Plus · Pinia · vue-router · SCSS
|
||||
|
||||
**Spec:** `docs/superpowers/specs/2026-06-30-portal-top-nav-only-design.md`
|
||||
|
||||
---
|
||||
|
||||
### Task 1: Portal 菜单工具函数
|
||||
|
||||
**Files:**
|
||||
- Modify: `web-admin/src/utils/router/portal-menu.ts`
|
||||
- Modify: `web-admin/src/utils/navigation/route.ts`
|
||||
|
||||
- [ ] **Step 1:** 在 `portal-menu.ts` 增加 `resolvePortalSubMenus(menuList, routePath)`、`getPortalDefaultPathForRoute(menuList, routePath)`
|
||||
- [ ] **Step 2:** 在 `route.ts` 增加 `getFirstSecondLevelMenuPathForModule(moduleChildren, modulePath?)` 导出
|
||||
|
||||
### Task 2: 水平菜单支持无图标
|
||||
|
||||
**Files:**
|
||||
- Modify: `web-admin/src/components/core/layouts/art-menus/art-horizontal-menu/index.vue`
|
||||
- Modify: `web-admin/src/components/core/layouts/art-menus/art-horizontal-menu/widget/HorizontalSubmenu.vue`
|
||||
|
||||
- [ ] **Step 1:** `HorizontalSubmenu` 增加 `showIcon` prop(默认 `true`)
|
||||
- [ ] **Step 2:** `ArtHorizontalMenu` 增加 `showIcon` prop 并向下传递
|
||||
|
||||
### Task 3: 新建顶栏导航组件
|
||||
|
||||
**Files:**
|
||||
- Create: `web-admin/src/components/core/layouts/art-portal-module-select/index.vue`
|
||||
- Create: `web-admin/src/components/core/layouts/art-portal-sub-nav/index.vue`
|
||||
- Create: `web-admin/src/components/core/layouts/art-portal-mobile-menu/index.vue`
|
||||
|
||||
- [ ] **Step 1:** 一级下拉 `el-dropdown` + 模块切换
|
||||
- [ ] **Step 2:** 二三级 `ArtHorizontalMenu` + `ellipsis` + Fresh Mint 样式
|
||||
- [ ] **Step 3:** ≤800px `el-drawer` + `SidebarSubmenu` 竖向树
|
||||
|
||||
### Task 4: 组装顶栏与布局
|
||||
|
||||
**Files:**
|
||||
- Modify: `web-admin/src/components/core/layouts/art-portal-header/index.vue`
|
||||
- Modify: `web-admin/src/views/index/index.vue`
|
||||
- Modify: `web-admin/src/views/index/style.portal.scss`
|
||||
- Modify: `web-admin/src/assets/styles/core/app.scss`
|
||||
|
||||
- [ ] **Step 1:** Header 替换 TopNav 为 ModuleSelect + SubNav + MobileMenu
|
||||
- [ ] **Step 2:** Portal 布局移除 `#app-sidebar`
|
||||
- [ ] **Step 3:** SCSS 全宽 workspace,删除侧栏规则
|
||||
|
||||
### Task 5: WorkTab 联动
|
||||
|
||||
**Files:**
|
||||
- Modify: `web-admin/src/store/modules/worktab.ts`
|
||||
- Modify: `web-admin/src/components/core/layouts/art-work-tab/index.vue`
|
||||
|
||||
- [ ] **Step 1:** 空标签落点改用 `getPortalDefaultPathForRoute`
|
||||
|
||||
### Task 6: 验证
|
||||
|
||||
- [ ] **Step 1:** `pnpm lint`(web-admin)
|
||||
- [ ] **Step 2:** `./scripts/update-graph.sh frontend`
|
||||
- [ ] **Step 3:** 浏览器手测:模块切换、ellipsis、800px 抽屉
|
||||
Reference in new issue
Block a user