style: 💄 代码格式优化
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user