fix: 修复后台管理面板 UI 问题 — 移除多余分隔符竖线,用 flex 布局替代 calc() 高度计算

This commit is contained in:
2026-03-31 20:42:42 +08:00
parent c087338009
commit 588df9f143
2 changed files with 4 additions and 6 deletions
+2 -4
View File
@@ -1,6 +1,5 @@
import { createFileRoute, Outlet } from '@tanstack/react-router'
import { AdminSidebar } from '@/components/AdminSidebar'
import { Separator } from '@/components/ui/separator'
import { SidebarInset, SidebarProvider, SidebarTrigger } from '@/components/ui/sidebar'
export const Route = createFileRoute('/_protected/admin' as never)({
@@ -14,11 +13,10 @@ function AdminLayout() {
<SidebarInset>
<header className="flex h-14 items-center gap-2 border-b px-6">
<SidebarTrigger />
<Separator orientation="vertical" className="h-4" />
</header>
<main className="flex-1 p-6">
<div className="flex min-h-0 flex-1 flex-col p-6">
<Outlet />
</main>
</div>
</SidebarInset>
</SidebarProvider>
)
@@ -32,13 +32,13 @@ function BookmarksAdmin() {
const selectedCategory = data.find((category: { id: string }) => category.id === selectedCategoryId)
return (
<div className="space-y-6">
<div className="flex min-h-0 flex-1 flex-col gap-6">
<div>
<h1 className="text-2xl font-bold tracking-tight"></h1>
<p className="text-muted-foreground"></p>
</div>
<div className="flex h-[calc(100vh-8rem)] gap-6">
<div className="flex min-h-0 flex-1 gap-6">
<div className="w-80 shrink-0">
<CategoryManager
categories={data}