"use client"; import { cn } from "@/lib/utils"; export interface TocEntry { id: string; title: string; level: number; numbering: string; } interface DocumentTocProps { entries: TocEntry[]; visible: boolean; onJump: (id: string) => void; } export function DocumentToc({ entries, visible, onJump }: DocumentTocProps) { if (!visible || entries.length === 0) { return null; } return (
标题目录
); }