From c70836a6a3e3ea302ed3fcf1b7abc3909c13c431 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 11 Jan 2022 10:57:37 +0800 Subject: [PATCH] feature: TopNav switchMenuShow --- components/TopNav.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/components/TopNav.js b/components/TopNav.js index 20fe43d8..021e7f23 100644 --- a/components/TopNav.js +++ b/components/TopNav.js @@ -43,6 +43,11 @@ const TopNav = ({ tags, currentTag, post, slot, categories, currentCategory, aut BLOG.autoCollapsedNavBar && window.removeEventListener('scroll', scrollTrigger) } }, []) + + const switchMenuShow = () => { + drawer?.current?.handleSwitchSideDrawerVisible() + } + return (
{/* 侧面抽屉 */} @@ -53,7 +58,7 @@ const TopNav = ({ tags, currentTag, post, slot, categories, currentCategory, aut
{/* 左侧LOGO 标题 */}
-
{ drawer.current.handleSwitchSideDrawerVisible() }} +