Sfoglia il codice sorgente

feat(web-admin): mount work tabs under left-layout header

Assemble header → worktab → content for the non-portal shell and migrate
legacy portal default so the classic sidebar layout is the entry experience.

Co-authored-by: Cursor <cursoragent@cursor.com>
zlwu 4 settimane fa
parent
commit
60aa9fd28f

+ 13 - 7
web-admin/src/views/index/index.vue

@@ -30,6 +30,9 @@
       <div id="app-header">
         <ArtHeaderBar />
       </div>
+      <div id="app-worktab">
+        <ArtWorkTab />
+      </div>
       <div id="app-content">
         <ArtPageContent />
       </div>
@@ -66,15 +69,18 @@
 
   onMounted(() => {
     const width = Number(settingStore.menuOpenWidth)
-    if (!Number.isFinite(width) || width < 270) {
-      settingStore.setMenuOpenWidth(270)
-    } else if (width === 290) {
-      settingStore.setMenuOpenWidth(270)
+    if (!Number.isFinite(width) || width < 220) {
+      settingStore.setMenuOpenWidth(220)
+    } else if (width === 270 || width === 290) {
+      // 收敛历史默认偏宽侧栏
+      settingStore.setMenuOpenWidth(220)
     }
-    if (menuType.value !== MenuTypeEnum.PORTAL) {
-      settingStore.switchMenuLayouts(MenuTypeEnum.PORTAL)
+
+    // 产品默认壳层:LEFT(不再强制 PORTAL;设置面板仍可切回门户)
+    if (menuType.value === MenuTypeEnum.PORTAL) {
+      settingStore.switchMenuLayouts(MenuTypeEnum.LEFT)
     }
-    // 门户:开启多页签;首页固定 Tab(不可关闭)
+
     settingStore.setWorkTab(true)
     const home = homePath.value || HOME_PAGE_PATH || '/home'
     if (home) {

+ 7 - 0
web-admin/src/views/index/style.scss

@@ -27,6 +27,13 @@
       width: 100%;
     }
 
+    #app-worktab {
+      flex-shrink: 0;
+      width: 100%;
+      background: #f1f5f9;
+      border-bottom: 1px solid var(--mint-border, #e2e8f0);
+    }
+
     #app-content {
       flex: 1;
       min-height: 0;