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
770f4ed3
Commit
770f4ed3
authored
Jul 15, 2026
by
pangchong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style(node-tree): 优化代码格式提升可读性
- 调整了多行代码的排版,使代码更易阅读 - 合并了部分条件表达式,保持代码简洁 - 未改变逻辑,仅美化了代码结构
parent
6a89bf01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/views/editor/components/NodeTree/components/BatchDeleteConfirmModal/functionals/index.ts
+5
-3
No files found.
src/views/editor/components/NodeTree/components/BatchDeleteConfirmModal/functionals/index.ts
View file @
770f4ed3
...
...
@@ -196,13 +196,15 @@ const partitionBatchDelete = (selectedNodeIds: string[], nodeMap: Map<string, {
// 获取或初始化父节点的原始子节点列表(用于位置判断,不随批量删除而变化)
const
parentOriginalTagsKey
=
`orig:
${
parentId
}
`
if
(
!
(
parentRemainingTagsMap
as
any
).
has
(
parentOriginalTagsKey
))
{
;(
parentRemainingTagsMap
as
any
).
set
(
parentOriginalTagsKey
,
item
.
parent
.
children
.
map
((
c
)
=>
c
.
tagName
))
;(
parentRemainingTagsMap
as
any
).
set
(
parentOriginalTagsKey
,
item
.
parent
.
children
.
map
((
c
)
=>
c
.
tagName
)
)
}
const
originalTags
:
string
[]
=
(
parentRemainingTagsMap
as
any
).
get
(
parentOriginalTagsKey
)
!
// 如果该节点在父级原始子节点列表中是最后一个(按位置),允许删除
const
isLastPositionally
=
originalTags
.
length
>
0
&&
originalTags
[
originalTags
.
length
-
1
]
===
item
.
node
.
tagName
const
isLastPositionally
=
originalTags
.
length
>
0
&&
originalTags
[
originalTags
.
length
-
1
]
===
item
.
node
.
tagName
if
(
isLastPositionally
)
{
const
index
=
remaining
.
indexOf
(
item
.
node
.
tagName
)
...
...
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