import { useState } from 'react' import Catalog from './Catalog' /** * 移动端悬浮目录按钮 */ export default function FloatTocButton(props) { const [tocVisible, changeTocVisible] = useState(false) const { post } = props const toggleToc = () => { changeTocVisible(!tocVisible) } // 没有目录就隐藏该按钮 if (!post || !post.toc || post.toc.length < 1) { return <> } return (
{/* 按钮 */}
{/* 目录Modal */}
{/* 侧边菜单 */}
{post && <>
}
{/* 背景蒙版 */}
) }