feat: add portal home launcher, favorites UI, and WorkTab overflow eviction
Replace top-bar module navigation with a card home page, persist favorites via API, reopen favorite tabs on cold login, and enable portal multi-tabs with overflow-based eviction. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7898d65437
commit
2df2ef0808
17 files changed
+2242
-157
No files matched your search
@@ -3,6 +3,7 @@
|
||||
<div v-if="isPortalLayout" class="app-layout app-layout-portal" :style="appLayoutStyle">
|
||||
<div id="app-portal-header">
|
||||
<ArtPortalHeader />
|
||||
<ArtWorkTab />
|
||||
</div>
|
||||
|
||||
<div id="app-portal-body">
|
||||
@@ -42,13 +43,16 @@
|
||||
import { computed, onMounted } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { MenuTypeEnum, MenuWidth } from '@/enums/appEnum'
|
||||
import { HOME_PAGE_PATH } from '@/router'
|
||||
import { useSettingStore } from '@/store/modules/setting'
|
||||
import { useWorktabStore } from '@/store/modules/worktab'
|
||||
import { useCommon } from '@/hooks/core/useCommon'
|
||||
|
||||
defineOptions({ name: 'AppLayout' })
|
||||
|
||||
const settingStore = useSettingStore()
|
||||
const worktabStore = useWorktabStore()
|
||||
const { homePath } = useCommon()
|
||||
const { menuType, getMenuOpenWidth } = storeToRefs(settingStore)
|
||||
|
||||
const isPortalLayout = computed(() => menuType.value === MenuTypeEnum.PORTAL)
|
||||
@@ -68,9 +72,21 @@
|
||||
if (menuType.value !== MenuTypeEnum.PORTAL) {
|
||||
settingStore.switchMenuLayouts(MenuTypeEnum.PORTAL)
|
||||
}
|
||||
// 门户布局强制严格单页(忽略 localStorage 中历史 showWorkTab=true)
|
||||
settingStore.setWorkTab(false)
|
||||
worktabStore.enforceSinglePageTabs()
|
||||
// 门户:开启多页签;首页固定 Tab
|
||||
settingStore.setWorkTab(true)
|
||||
const home = homePath.value || HOME_PAGE_PATH || '/home'
|
||||
if (home && !worktabStore.opened.some((t) => t.path === home)) {
|
||||
worktabStore.openTab(
|
||||
{
|
||||
path: home,
|
||||
title: '首页',
|
||||
name: 'PortalHome',
|
||||
fixedTab: true,
|
||||
keepAlive: true
|
||||
},
|
||||
{ activate: false }
|
||||
)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in new issue
Block a user