style: 💄 代码格式优化

This commit is contained in:
cshaptx4869
2024-08-14 11:01:31 +08:00
committed by ray
parent ceeecb6315
commit 156dc1821c
5 changed files with 8 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ export const useTagsViewStore = defineStore("tagsView", () => {
const cachedViews = ref<string[]>([]);
const router = useRouter();
const route = useRoute();
/**
* 添加已访问视图到已访问视图列表中
*/
@@ -144,6 +145,7 @@ export const useTagsViewStore = defineStore("tagsView", () => {
});
});
}
function delRightViews(view: TagView) {
return new Promise((resolve) => {
const currIndex = visitedViews.value.findIndex(
@@ -209,6 +211,7 @@ export const useTagsViewStore = defineStore("tagsView", () => {
}
});
}
function isActive(tag: TagView) {
return tag.path === route.path;
}
@@ -228,6 +231,7 @@ export const useTagsViewStore = defineStore("tagsView", () => {
}
}
}
return {
visitedViews,
cachedViews,

View File

@@ -1,8 +1,7 @@
import AuthAPI, { LoginData } from "@/api/auth";
import UserAPI, { UserInfo } from "@/api/user";
import AuthAPI, { type LoginData } from "@/api/auth";
import UserAPI, { type UserInfo } from "@/api/user";
import { resetRouter } from "@/router";
import { store } from "@/store";
import { TOKEN_KEY } from "@/enums/CacheEnum";
export const useUserStore = defineStore("user", () => {