mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-13 12:49:30 +00:00
feat: 优化工作台页面样式和快速开始功能
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user