refactor: standardize code formatting and linting configuration

- Replace .eslintrc.js with .eslintrc.cjs for better ES module compatibility
- Add .prettierrc configuration for consistent code formatting
- Update package.json with new lint and format scripts
- Add nodemon.json for development hot reloading configuration
- Standardize code formatting across all JavaScript and Vue files
- Update web admin SPA with improved linting rules and formatting
- Add prettier configuration to web admin SPA

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
千羽
2025-08-07 18:19:31 +09:00
parent 4a0eba117c
commit 8a74bf5afe
124 changed files with 20878 additions and 18757 deletions

View File

@@ -2,25 +2,19 @@
<div class="min-h-screen p-3 sm:p-4 md:p-6">
<!-- 顶部导航 -->
<AppHeader />
<!-- 主内容区域 -->
<div
class="glass-strong rounded-xl sm:rounded-2xl md:rounded-3xl p-3 sm:p-4 md:p-6 shadow-xl"
style="z-index: 1; min-height: calc(100vh - 120px);"
class="glass-strong rounded-xl p-3 shadow-xl sm:rounded-2xl sm:p-4 md:rounded-3xl md:p-6"
style="z-index: 1; min-height: calc(100vh - 120px)"
>
<!-- 标签栏 -->
<TabBar
:active-tab="activeTab"
@tab-change="handleTabChange"
/>
<TabBar :active-tab="activeTab" @tab-change="handleTabChange" />
<!-- 内容区域 -->
<div class="tab-content">
<router-view v-slot="{ Component }">
<transition
name="slide-up"
mode="out-in"
>
<transition mode="out-in" name="slide-up">
<keep-alive :include="['DashboardView', 'ApiKeysView']">
<component :is="Component" />
</keep-alive>
@@ -52,14 +46,16 @@ const tabRouteMap = {
}
// 监听路由变化,更新激活的标签
watch(() => route.path, (newPath) => {
const tabKey = Object.keys(tabRouteMap).find(
key => tabRouteMap[key] === newPath
)
if (tabKey) {
activeTab.value = tabKey
}
}, { immediate: true })
watch(
() => route.path,
(newPath) => {
const tabKey = Object.keys(tabRouteMap).find((key) => tabRouteMap[key] === newPath)
if (tabKey) {
activeTab.value = tabKey
}
},
{ immediate: true }
)
// 处理标签切换
const handleTabChange = (tabKey) => {
@@ -72,4 +68,4 @@ const handleTabChange = (tabKey) => {
<style scoped>
/* 使用全局定义的过渡样式 */
</style>
</style>