Skip to content

Commit

Permalink
fix: 修复 baidu#9418 调整带来的点选双重身份的组件时选中的是孩子的问题 (baidu#9437)
Browse files Browse the repository at this point in the history
  • Loading branch information
2betop committed Jan 15, 2024
1 parent f45cb59 commit 2112f75
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/amis-editor-core/src/store/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,10 @@ export const MainStore = types
if (node.region) {
map[node.id + '-' + node.region] = node;
} else {
map[node.id] = node;
// 同名类型不同的节点,优先使用上层的
// 因为原来的 getNodeById 是这种查找策略
// 所以孩子节点在父级写入了的情况下不写入
map[node.id] = map[node.id] || node;
map[node.id + '-' + node.type] = node;
}

Expand Down

0 comments on commit 2112f75

Please sign in to comment.