mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-11-11 02:57:09 +08:00
refactor: 调整 eslint.config.js,优化代码格式
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ const storeSetup = () => {
|
||||
closeRight,
|
||||
closeAll,
|
||||
reset,
|
||||
init
|
||||
init,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user