Skip to content

Commit

Permalink
fix: parent is not displayed in page settings
Browse files Browse the repository at this point in the history
  • Loading branch information
gene9831 committed Jan 13, 2025
1 parent 30ba9bb commit 72c5003
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/plugins/page/src/PageGeneral.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,15 @@ export default {
const pageToTreeData = (page) => {
const { id, name, isPage, children } = page
if (!Array.isArray(children)) {
return { id, name, isPage }
}
const result = { id: String(id), name, isPage }
return {
id,
name,
isPage,
children: children
if (Array.isArray(children)) {
result.children = children
.filter((page) => page.id !== pageSettingState.currentPageData.id)
.map((page) => pageToTreeData(page))
}
return result
}
const getNodeIcon = (data) => {
Expand Down

0 comments on commit 72c5003

Please sign in to comment.