gitbook 滚动目录

This commit is contained in:
tangly1024
2023-06-24 20:23:39 +08:00
parent 39ed5ed86f
commit accf8bc605
2 changed files with 3 additions and 3 deletions

View File

@@ -60,7 +60,7 @@ const Catalog = ({ post }) => {
}
return <>
<div id='toc-wrapper' className='overflow-y-auto max-h-96 overscroll-none scroll-hidden'>
<div id='toc-wrapper' className='max-h-96 scroll-hidden'>
<nav className='h-full text-black'>
{toc.map((tocItem) => {
const id = uuidToId(tocItem.id)

View File

@@ -18,9 +18,9 @@ const TocDrawer = ({ post, cRef }) => {
{/* 侧边菜单 */}
<div
className={(tocVisible ? 'animate__slideInRight ' : ' -mr-72 animate__slideOutRight') +
' overflow-y-hidden shadow-card w-60 duration-200 fixed right-1 bottom-16 rounded py-2 bg-white dark:bg-gray-900'}>
' shadow-card w-60 duration-200 fixed right-1 bottom-16 rounded py-2 bg-white dark:bg-gray-900'}>
{post && <>
<div className='dark:text-gray-400 text-gray-600 h-56 p-3'>
<div className='dark:text-gray-400 text-gray-600 h-56 p-3 overflow-y-scroll '>
<Catalog post={post}/>
</div>
</>}