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

@@ -13,25 +13,25 @@ export const constantRoutes: RouteRecordRaw[] = [
children: [
{
path: '/redirect/:path(.*)',
component: () => import('@/views/default/redirect/index.vue')
}
]
component: () => import('@/views/default/redirect/index.vue'),
},
],
},
{
path: '/login',
name: 'Login',
component: () => import('@/views/login/index.vue'),
meta: { hidden: true }
meta: { hidden: true },
},
{
path: '/:pathMatch(.*)*',
component: () => import('@/views/default/error/404.vue'),
meta: { hidden: true }
meta: { hidden: true },
},
{
path: '/403',
component: () => import('@/views/default/error/403.vue'),
meta: { hidden: true }
meta: { hidden: true },
},
{
path: '/',
@@ -44,25 +44,25 @@ export const constantRoutes: RouteRecordRaw[] = [
path: '/dashboard/workplace',
name: 'Workplace',
component: () => import('@/views/dashboard/workplace/index.vue'),
meta: { title: '工作台', icon: 'desktop', hidden: false, affix: true }
meta: { title: '工作台', icon: 'desktop', hidden: false, affix: true },
},
{
path: '/dashboard/analysis',
name: 'Analysis',
component: () => import('@/views/dashboard/analysis/index.vue'),
meta: { title: '分析页', icon: 'insert-chart', hidden: false }
}
]
meta: { title: '分析页', icon: 'insert-chart', hidden: false },
},
],
},
{
path: '/social/callback',
component: () => import('@/views/login/social/index.vue'),
meta: { hidden: true }
meta: { hidden: true },
},
{
path: '/pwdExpired',
component: () => import('@/views/login/pwdExpired/index.vue'),
meta: { hidden: true }
meta: { hidden: true },
},
{
path: '/setting',
@@ -74,22 +74,22 @@ export const constantRoutes: RouteRecordRaw[] = [
path: '/setting/profile',
name: 'SettingProfile',
component: () => import('@/views/setting/profile/index.vue'),
meta: { title: '个人中心', showInTabs: false }
meta: { title: '个人中心', showInTabs: false },
},
{
path: '/setting/message',
name: 'SettingMessage',
component: () => import('@/views/setting/message/index.vue'),
meta: { title: '消息中心', showInTabs: false }
}
]
}
meta: { title: '消息中心', showInTabs: false },
},
],
},
]
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
routes: constantRoutes,
scrollBehavior: () => ({ left: 0, top: 0 })
scrollBehavior: () => ({ left: 0, top: 0 }),
})
/**

View File

@@ -27,7 +27,7 @@ const handleNotification = () => {
position: 'bottomRight',
footer: () => {
return h(Space, {}, () => [h(Button, { type: 'primary', onClick: () => onUpdateSystem(id) }, '更新'), h(Button, { type: 'secondary', onClick: () => onCloseUpdateSystem(id) }, '关闭')])
}
},
})
}
@@ -37,7 +37,7 @@ const handleNotification = () => {
*/
const getVersionTag = async () => {
const response = await fetch('/', {
cache: 'no-cache'
cache: 'no-cache',
})
return response.headers.get('etag') || response.headers.get('last-modified')
}