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