mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
merge main & release 4.0.0
This commit is contained in:
@@ -15,7 +15,7 @@ const NavPostList = (props) => {
|
||||
let selectedSth = false
|
||||
|
||||
// 处理是否选中
|
||||
filteredPostGroups.map((group) => {
|
||||
filteredPostGroups?.map((group) => {
|
||||
let groupSelected = false
|
||||
for (const post of group?.items) {
|
||||
if (router.asPath.split('?')[0] === '/' + post.slug) {
|
||||
@@ -28,7 +28,7 @@ const NavPostList = (props) => {
|
||||
})
|
||||
|
||||
// 如果都没有选中默认打开第一个
|
||||
if (!selectedSth && filteredPostGroups && filteredPostGroups.length > 0) {
|
||||
if (!selectedSth && filteredPostGroups && filteredPostGroups?.length > 0) {
|
||||
filteredPostGroups[0].selected = true
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import NavPostList from './NavPostList'
|
||||
*/
|
||||
const PageNavDrawer = (props) => {
|
||||
const { pageNavVisible, changePageNavVisible } = useGitBookGlobal()
|
||||
const { filteredPosts } = props
|
||||
const { filteredPostGroups } = props
|
||||
const switchVisible = () => {
|
||||
changePageNavVisible(!pageNavVisible)
|
||||
}
|
||||
@@ -23,7 +23,7 @@ const PageNavDrawer = (props) => {
|
||||
' overflow-y-hidden shadow-card w-72 duration-200 fixed left-1 top-16 rounded py-2 bg-white dark:bg-gray-600'}>
|
||||
<div className='dark:text-gray-400 text-gray-600 h-96 overflow-y-scroll p-3'>
|
||||
{/* 所有文章列表 */}
|
||||
<NavPostList filteredPosts={filteredPosts} />
|
||||
<NavPostList filteredPostGroups={filteredPostGroups} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user