Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
Ifar-Xml-Edtor
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pangchong
Ifar-Xml-Edtor
Commits
f13e58fd
Commit
f13e58fd
authored
Jul 06, 2026
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 防止树节点副标题递归获取并拼接任何子节点的文本内容,避免全局出现重复
parent
16b2c0bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
6 deletions
+1
-6
src/views/editor/components/NodeTree/functionals/index.ts
+1
-6
No files found.
src/views/editor/components/NodeTree/functionals/index.ts
View file @
f13e58fd
...
@@ -189,13 +189,8 @@ export function useNodeTree(
...
@@ -189,13 +189,8 @@ export function useNodeTree(
.
map
((
item
)
=>
{
.
map
((
item
)
=>
{
if
(
item
.
type
===
'text'
)
{
if
(
item
.
type
===
'text'
)
{
return
item
.
text
||
''
return
item
.
text
||
''
}
else
if
(
item
.
type
===
'element'
&&
item
.
nodeId
)
{
if
(
n
.
tagName
===
'REFBLOCK'
)
{
return
''
}
const
child
=
n
.
children
.
find
((
c
)
=>
c
.
id
===
item
.
nodeId
)
return
child
?
getFullText
(
child
)
:
''
}
}
// 避免递归获取子元素的文本内容,因为子元素在树结构中会作为独立节点展示
return
''
return
''
})
})
.
join
(
''
)
.
join
(
''
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment