fix: 修复eslint错误
This commit is contained in:
parent
ee059b7619
commit
b5e47e04d8
|
@ -24,6 +24,7 @@ module.exports = defineConfig({
|
||||||
'plugin:prettier/recommended'
|
'plugin:prettier/recommended'
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
|
'vue/no-setup-props-destructure': 'off',
|
||||||
'vue/script-setup-uses-vars': 'error',
|
'vue/script-setup-uses-vars': 'error',
|
||||||
'vue/no-reserved-component-names': 'off',
|
'vue/no-reserved-component-names': 'off',
|
||||||
'@typescript-eslint/ban-ts-ignore': 'off',
|
'@typescript-eslint/ban-ts-ignore': 'off',
|
||||||
|
|
|
@ -5,15 +5,15 @@ import type { RouteRecordRaw } from 'vue-router'
|
||||||
import { useTitle } from '@/hooks/web/useTitle'
|
import { useTitle } from '@/hooks/web/useTitle'
|
||||||
import { useNProgress } from '@/hooks/web/useNProgress'
|
import { useNProgress } from '@/hooks/web/useNProgress'
|
||||||
import { usePermissionStoreWithOut } from '@/store/modules/permission'
|
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 { usePageLoading } from '@/hooks/web/usePageLoading'
|
||||||
import { getDictApi } from '@/api/common'
|
// import { getDictApi } from '@/api/common'
|
||||||
|
|
||||||
const permissionStore = usePermissionStoreWithOut()
|
const permissionStore = usePermissionStoreWithOut()
|
||||||
|
|
||||||
const appStore = useAppStoreWithOut()
|
const appStore = useAppStoreWithOut()
|
||||||
|
|
||||||
const dictStore = useDictStoreWithOut()
|
// const dictStore = useDictStoreWithOut()
|
||||||
|
|
||||||
const { getStorage } = useStorage()
|
const { getStorage } = useStorage()
|
||||||
|
|
||||||
|
@ -30,14 +30,14 @@ router.beforeEach(async (to, from, next) => {
|
||||||
if (to.path === '/login') {
|
if (to.path === '/login') {
|
||||||
next({ path: '/' })
|
next({ path: '/' })
|
||||||
} else {
|
} else {
|
||||||
if (!dictStore.getIsSetDict) {
|
// if (!dictStore.getIsSetDict) {
|
||||||
// 获取所有字典
|
// // 获取所有字典
|
||||||
const res = await getDictApi()
|
// const res = await getDictApi()
|
||||||
if (res) {
|
// if (res) {
|
||||||
dictStore.setDictObj(res.data)
|
// dictStore.setDictObj(res.data)
|
||||||
dictStore.setIsSetDict(true)
|
// dictStore.setIsSetDict(true)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (permissionStore.getIsAddRouters) {
|
if (permissionStore.getIsAddRouters) {
|
||||||
next()
|
next()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue