mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
gitbook 延时展开侧边分组
This commit is contained in:
@@ -61,10 +61,12 @@ const NavPostList = props => {
|
||||
|
||||
// 如果都没有选中默认打开第一个
|
||||
useEffect(() => {
|
||||
if (expandedGroups.length === 0) {
|
||||
setExpandedGroups([0])
|
||||
}
|
||||
}, [])
|
||||
setTimeout(() => {
|
||||
if (expandedGroups.length === 0) {
|
||||
setExpandedGroups([0])
|
||||
}
|
||||
}, 500)
|
||||
}, [router])
|
||||
|
||||
// 折叠项切换,当折叠或展开数组时会调用
|
||||
const toggleItem = index => {
|
||||
|
||||
Reference in New Issue
Block a user