diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 4783582..e7d0fca 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -38,7 +38,9 @@ const ApprovalPermissionPage = lazy(() => import('@/pages/ApprovalPermissionPage const ApprovalWorkflowPage = lazy(() => import('@/pages/ApprovalWorkflowPage').then(m => ({ default: m.default }))); const ScriptManager = lazy(() => import('@/components/automation/ScriptManager').then(m => ({ default: m.ScriptManager }))); const SystemManager = lazy(() => import('@/components/system/SystemManager').then(m => ({ default: m.SystemManager }))); -const AuditPage = lazy(() => import('@/pages/AuditPage').then(m => ({ default: m.AuditPage }))); +const TerminalAuditTab = lazy(() => import('@/pages/TerminalAuditTab').then(m => ({ default: m.TerminalAuditTab }))); +const AuditOperationsTab = lazy(() => import('@/pages/AuditOperationsTab').then(m => ({ default: m.AuditOperationsTab }))); +const LoginLogsTab = lazy(() => import('@/pages/LoginLogsTab').then(m => ({ default: m.LoginLogsTab }))); const CredentialManager = lazy(() => import('@/components/deploy/CredentialManager').then(m => ({ default: m.default }))); const PipelineManager = lazy(() => import('@/components/deploy/PipelineManager').then(m => ({ default: m.PipelineManager }))); const DeployCredentials = lazy(() => import('@/components/deploy/DeployCredentials').then(m => ({ default: m.default }))); @@ -190,10 +192,10 @@ function App() { } /> } /> - {/* Audit */} - } /> - } /> - } /> + {/* Audit — 各 Tab 独立路由,支持 URL 直链 // Logan.Li */} + } /> + } /> + } /> {/* System */} } /> diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 6e0e89f..e59627b 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -5,7 +5,8 @@ import { inspectAttr } from 'kimi-plugin-inspect-react' // https://vite.dev/config/ export default defineConfig({ - base: './', + // 必须用绝对路径,否则 /audit/terminal 等深链会解析成 /audit/assets/... 导致白屏 // Logan.Li + base: '/', plugins: [inspectAttr(), react()], resolve: { alias: {