mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-22 15:09:43 +00:00
feature:
添加大量可配置项
This commit is contained in:
@@ -35,12 +35,12 @@ const TopNav = ({ tags, currentTag, post, posts, categories, currentCategory, au
|
||||
|
||||
// 监听滚动
|
||||
useEffect(() => {
|
||||
if (autoHide) {
|
||||
if (BLOG.autoCollapsedNavBar) {
|
||||
scrollTrigger()
|
||||
window.addEventListener('scroll', scrollTrigger)
|
||||
}
|
||||
return () => {
|
||||
autoHide && window.removeEventListener('scroll', scrollTrigger)
|
||||
BLOG.autoCollapsedNavBar && window.removeEventListener('scroll', scrollTrigger)
|
||||
}
|
||||
}, [])
|
||||
return (<div id='top-nav' className='sticky top-0 z-40 block lg:hidden'>
|
||||
|
||||
Reference in New Issue
Block a user