feat: 优化工作台页面样式和快速开始功能

This commit is contained in:
Guo Tiantian
2025-08-27 22:55:24 +08:00
parent c2de9765c2
commit c03fd45cc9
4 changed files with 26 additions and 64 deletions
@@ -236,6 +236,7 @@ const extractAffixTags = (routes: RouteRecordRaw[], basePath = "/"): TagView[] =
fullPath,
name: String(route.name || ""),
title: route.meta.title || "no-name",
icon: (route as any).icon || route.meta?.icon,
affix: true,
keepAlive: route.meta.keepAlive || false,
});
@@ -271,6 +272,7 @@ const initAffixTags = () => {
const addCurrentTag = () => {
if (!route.meta?.title) return;
// 检查标签是否已存在
const existingTag = visitedViews.value.find(tag => tag.path === route.path);
@@ -292,12 +294,14 @@ const addCurrentTag = () => {
title: route.meta.title,
path: route.path,
fullPath: route.fullPath,
icon: (route as any).icon || route.meta?.icon,
affix: route.meta.affix || false,
keepAlive: route.meta.keepAlive || false,
query: route.query,
});
}
// 检查是否需要自动滚动到最新标签
nextTick(() => {
autoScrollToLatestTag();
@@ -317,6 +321,7 @@ const updateCurrentTag = () => {
title: route.meta?.title || "",
path: route.path,
fullPath: route.fullPath,
icon: (route as any).icon || route.meta?.icon,
affix: route.meta?.affix || false,
keepAlive: route.meta?.keepAlive || false,
query: route.query,