|
@@ -1,5 +1,5 @@
|
|
|
export const useTagsViewStore = defineStore('tagsView', () => {
|
|
|
- const visitedViews = ref([])
|
|
|
+ const visitedViews = ref([{ affix: true, fullPath: '/', keepAlive: true, name: 'dashboard', path: '/', title: '首页' }])
|
|
|
const cachedViews = ref([])
|
|
|
|
|
|
/**
|
|
@@ -28,7 +28,6 @@ export const useTagsViewStore = defineStore('tagsView', () => {
|
|
|
if (cachedViews.value.includes(viewName)) {
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
// 如果视图需要缓存(keepAlive),则将其路由名称添加到缓存视图列表中
|
|
|
if (view.keepAlive) {
|
|
|
cachedViews.value.push(viewName)
|