Merge pull request #187 from tangly1024/feature_catelog_scrollbar

目录滚动条隐藏
This commit is contained in:
tangly1024
2022-04-19 15:07:44 +08:00
committed by GitHub
4 changed files with 18 additions and 18 deletions

View File

@@ -58,7 +58,7 @@ const Catalog = ({ toc }) => {
return <div> return <div>
<div className='w-full dark:text-gray-300 mb-2'><i className='mr-1 fas fa-stream' /> 目录</div> <div className='w-full dark:text-gray-300 mb-2'><i className='mr-1 fas fa-stream' /> 目录</div>
<div className='overflow-y-auto max-h-96 overscroll-none' ref={tRef}> <div className='overflow-y-auto max-h-96 overscroll-none scroll-hidden' ref={tRef}>
<nav className='h-full font-sans text-black'> <nav className='h-full font-sans text-black'>
{toc.map((tocItem) => { {toc.map((tocItem) => {
const id = uuidToId(tocItem.id) const id = uuidToId(tocItem.id)

View File

@@ -62,7 +62,7 @@ const Catalog = ({ toc }) => {
<div className='w-full py-3'> <div className='w-full py-3'>
<Progress /> <Progress />
</div> </div>
<div className='overflow-y-auto max-h-36 lg:max-h-96 overscroll-none' ref={tRef}> <div className='overflow-y-auto max-h-36 lg:max-h-96 overscroll-none scroll-hidden' ref={tRef}>
<nav className='h-full font-sans text-black'> <nav className='h-full font-sans text-black'>
{toc.map((tocItem) => { {toc.map((tocItem) => {
const id = uuidToId(tocItem.id) const id = uuidToId(tocItem.id)

View File

@@ -61,7 +61,7 @@ const Catalog = ({ toc }) => {
<div className='w-full mt-2 mb-4'> <div className='w-full mt-2 mb-4'>
<Progress /> <Progress />
</div> </div>
<div className='overflow-y-auto max-h-96 overscroll-none' ref={tRef}> <div className='overflow-y-auto max-h-96 overscroll-none scroll-hidden' ref={tRef}>
<nav className='h-full font-sans text-black'> <nav className='h-full font-sans text-black'>
{toc.map((tocItem) => { {toc.map((tocItem) => {
const id = uuidToId(tocItem.id) const id = uuidToId(tocItem.id)

View File

@@ -62,7 +62,7 @@ const Toc = ({ toc }) => {
<div className='w-full pb-1'> <div className='w-full pb-1'>
<Progress /> <Progress />
</div> </div>
<div className='overflow-y-auto max-h-96 overscroll-none' ref={tRef}> <div className='overflow-y-auto max-h-96 overscroll-none scroll-hidden' ref={tRef}>
<nav className='h-full font-sans text-black dark:text-gray-300'> <nav className='h-full font-sans text-black dark:text-gray-300'>
{toc.map((tocItem) => { {toc.map((tocItem) => {
const id = uuidToId(tocItem.id) const id = uuidToId(tocItem.id)