diff --git a/src/permission.ts b/src/permission.ts index c34e03b..353adb5 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -20,7 +20,7 @@ const isWhiteList = (path: string) => { router.beforeEach(async (to, from, next) => { NProgress.start(); if (getToken()) { - to.meta.title && useSettingsStore().setTitle(to.meta.title); + to.meta.title && useSettingsStore().setTitle(to.meta.title as string); /* has token*/ if (to.path === '/login') { next({ path: '/' }); diff --git a/src/store/modules/settings.ts b/src/store/modules/settings.ts index bcd237a..c26024c 100644 --- a/src/store/modules/settings.ts +++ b/src/store/modules/settings.ts @@ -5,6 +5,7 @@ import { useStorage } from '@vueuse/core'; import { ref } from 'vue'; export const useSettingsStore = defineStore('setting', () => { + // @ts-ignore const storageSetting = useStorage('layout-setting', { topNav: defaultSettings.topNav, tagsView: defaultSettings.tagsView, diff --git a/tsconfig.json b/tsconfig.json index f3dcef3..c5e5ca3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -31,7 +31,7 @@ "forceConsistentCasingInFileNames": true // 强制在文件名中使用一致的大小写 }, "include": [ - "src/**/.ts", + "src/**/*.ts", "src/**/*.vue", "vite.config.ts", "vitest.config.ts",