fix: 添加打开应用功能
This commit is contained in:
@@ -58,8 +58,8 @@ export const useAppStore = defineStore('app', {
|
||||
size: false, // 尺寸图标
|
||||
locale: false, // 多语言图标
|
||||
message: false, // 消息图标
|
||||
tagsView: false, // 标签页
|
||||
tagsViewImmerse: false, // 标签页沉浸
|
||||
tagsView: true, // 标签页
|
||||
tagsViewImmerse: true, // 标签页沉浸
|
||||
tagsViewIcon: true, // 是否显示标签图标
|
||||
logo: false, // logo - 删除默认logo,自定义显示
|
||||
fixedHeader: true, // 固定toolheader - 确保header固定
|
||||
|
@@ -161,12 +161,25 @@ export const useTagsViewStore = defineStore('tagsView', {
|
||||
this.selectedTag = tag
|
||||
},
|
||||
setTitle(title: string, path?: string) {
|
||||
const targetPath = path ?? this.selectedTag?.fullPath
|
||||
for (const v of this.visitedViews) {
|
||||
if (v.path === (path ?? this.selectedTag?.path)) {
|
||||
// 使用 fullPath 匹配,包含查询参数,以区分不同的工具分类页面
|
||||
if (v.fullPath === targetPath || (v.path === targetPath && !path)) {
|
||||
v.meta.title = title
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
setIcon(icon: string, path?: string) {
|
||||
const targetPath = path ?? this.selectedTag?.fullPath
|
||||
for (const v of this.visitedViews) {
|
||||
// 使用 fullPath 匹配,包含查询参数,以区分不同的工具分类页面
|
||||
if (v.fullPath === targetPath || (v.path === targetPath && !path)) {
|
||||
if (!v.meta) v.meta = {}
|
||||
v.meta.icon = icon
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
persist: false
|
||||
|
Reference in New Issue
Block a user