mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
bugfix:
导航菜单首次点击失效
This commit is contained in:
@@ -16,12 +16,13 @@ const SideBarDrawer = ({ post, currentTag, cRef, tags, posts, categories, curren
|
||||
const [isShow, changeHiddenStatus] = useState(false)
|
||||
// 点击按钮更改侧边抽屉状态
|
||||
const switchSideDrawerVisible = () => {
|
||||
changeHiddenStatus(!isShow)
|
||||
const showStatus = !isShow
|
||||
changeHiddenStatus(showStatus)
|
||||
if (window) {
|
||||
const sideBarDrawer = window.document.getElementById('sidebar-drawer')
|
||||
const sideBarDrawerBackground = window.document.getElementById('sidebar-drawer-background')
|
||||
|
||||
if (isShow) {
|
||||
if (showStatus) {
|
||||
sideBarDrawer.classList.replace('-ml-72', 'ml-0')
|
||||
sideBarDrawerBackground.classList.replace('hidden', 'block')
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user