From 0815fa2978e2bdd45287983fa17370d3e1931fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Wed, 12 Mar 2025 12:14:51 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20pr=E4=B9=A6=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.ts | 2 +- src/store/modules/settings.ts | 1 + tsconfig.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) 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",