From b5e47e04d8f5f889e0c46a2dced108d058ded94e Mon Sep 17 00:00:00 2001 From: kailong321200875 <321200875@qq.com> Date: Mon, 7 Aug 2023 09:25:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Deslint=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 1 + src/permission.ts | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 2aec88b..4cad823 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,6 +24,7 @@ module.exports = defineConfig({ 'plugin:prettier/recommended' ], rules: { + 'vue/no-setup-props-destructure': 'off', 'vue/script-setup-uses-vars': 'error', 'vue/no-reserved-component-names': 'off', '@typescript-eslint/ban-ts-ignore': 'off', diff --git a/src/permission.ts b/src/permission.ts index 48c8c4a..92eebfb 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -5,15 +5,15 @@ import type { RouteRecordRaw } from 'vue-router' import { useTitle } from '@/hooks/web/useTitle' import { useNProgress } from '@/hooks/web/useNProgress' import { usePermissionStoreWithOut } from '@/store/modules/permission' -import { useDictStoreWithOut } from '@/store/modules/dict' +// import { useDictStoreWithOut } from '@/store/modules/dict' import { usePageLoading } from '@/hooks/web/usePageLoading' -import { getDictApi } from '@/api/common' +// import { getDictApi } from '@/api/common' const permissionStore = usePermissionStoreWithOut() const appStore = useAppStoreWithOut() -const dictStore = useDictStoreWithOut() +// const dictStore = useDictStoreWithOut() const { getStorage } = useStorage() @@ -30,14 +30,14 @@ router.beforeEach(async (to, from, next) => { if (to.path === '/login') { next({ path: '/' }) } else { - if (!dictStore.getIsSetDict) { - // 获取所有字典 - const res = await getDictApi() - if (res) { - dictStore.setDictObj(res.data) - dictStore.setIsSetDict(true) - } - } + // if (!dictStore.getIsSetDict) { + // // 获取所有字典 + // const res = await getDictApi() + // if (res) { + // dictStore.setDictObj(res.data) + // dictStore.setIsSetDict(true) + // } + // } if (permissionStore.getIsAddRouters) { next() return