feature: 悬浮按钮调整;

目录进度条bug修复
This commit is contained in:
tangly1024
2022-01-12 12:37:12 +08:00
parent d926c726b5
commit 5b69aaa3a5
9 changed files with 33 additions and 24 deletions

View File

@@ -9,7 +9,7 @@ import { useGlobal } from '@/lib/global'
* @returns {JSX.Element}
* @constructor
*/
const TocDrawer = ({ post, cRef, targetRef }) => {
const TocDrawer = ({ post, cRef }) => {
// 暴露给父组件 通过cRef.current.handleMenuClick 调用
useImperativeHandle(cRef, () => {
return {
@@ -33,7 +33,7 @@ const TocDrawer = ({ post, cRef, targetRef }) => {
{locale.COMMON.TABLE_OF_CONTENTS}
</div>
<div className='p-6 dark:text-gray-400 text-gray-600 bg-white dark:bg-gray-800'>
<Toc toc={post.toc} targetRef={targetRef}/>
<Toc toc={post.toc}/>
</div>
</>
}