refactor: 调整 eslint.config.js,优化代码格式

This commit is contained in:
2024-10-28 21:20:08 +08:00
parent 0e8fe5ff1f
commit 9e5dff144b
176 changed files with 5956 additions and 5624 deletions

View File

@@ -59,7 +59,7 @@ const storeSetup = () => {
// 初始化系统配置
const initSiteConfig = () => {
listOptionDict({
category: 'SITE'
category: 'SITE',
}).then((res) => {
const resMap = new Map()
res.data.forEach((item) => {
@@ -118,7 +118,7 @@ const storeSetup = () => {
getLogo,
getTitle,
getCopyright,
getForRecord
getForRecord,
}
}

View File

@@ -9,7 +9,7 @@ const storeSetup = () => {
if (_code !== null && _code !== '') {
dictData.value.push({
code: _code,
items
items,
})
}
}
@@ -50,7 +50,7 @@ const storeSetup = () => {
setDict,
getDict,
deleteDict,
cleanDict
cleanDict,
}
}

View File

@@ -66,8 +66,8 @@ const formatAsyncRoutes = (menus: RouteItem[]) => {
keepAlive: item.isCache,
icon: item.icon,
showInTabs: item.showInTabs,
activeMenu: item.activeMenu
}
activeMenu: item.activeMenu,
},
}
})
return routes as RouteRecordRaw[]
@@ -124,7 +124,7 @@ const storeSetup = () => {
return {
routes,
asyncRoutes,
generateRoutes
generateRoutes,
}
}

View File

@@ -127,7 +127,7 @@ const storeSetup = () => {
closeRight,
closeAll,
reset,
init
init,
}
}

View File

@@ -11,7 +11,7 @@ import {
getUserInfo as getUserInfoApi,
logout as logoutApi,
phoneLogin as phoneLoginApi,
socialLogin as socialLoginApi
socialLogin as socialLoginApi,
} from '@/apis'
import { clearToken, getToken, setToken } from '@/utils/auth'
import { resetHasRouteFlag } from '@/router/permission'
@@ -30,7 +30,7 @@ const storeSetup = () => {
registrationDate: '',
deptName: '',
roles: [],
permissions: []
permissions: [],
})
const nickname = computed(() => userInfo.nickname)
const username = computed(() => userInfo.username)
@@ -123,10 +123,10 @@ const storeSetup = () => {
logout,
logoutCallBack,
getInfo,
resetToken
resetToken,
}
}
export const useUserStore = defineStore('user', storeSetup, {
persist: { paths: ['token', 'roles', 'permissions', 'pwdExpiredShow'], storage: localStorage }
persist: { paths: ['token', 'roles', 'permissions', 'pwdExpiredShow'], storage: localStorage },
})