fix(annotation): 修复模板配置树编辑器组件渲染问题

- 为 Tree 组件添加 key 属性以确保正确的组件实例化
- 启用 defaultExpandAll 属性以默认展开所有节点
- 保持拖拽功能在结构锁定状态下的正常工作
This commit is contained in:
2026-01-23 16:16:02 +08:00
parent 3f566a0b08
commit 8e06a36460

View File

@@ -707,11 +707,13 @@ const TemplateConfigurationTreeEditor = ({
<Alert message={parseError} type="error" showIcon style={{ marginBottom: 8 }} />
)}
<Tree
key={tree.id}
treeData={treeData}
selectedKeys={[selectedId]}
onSelect={(keys) => {
if (keys.length > 0) setSelectedId(String(keys[0]));
}}
defaultExpandAll
draggable={!isStructureLocked}
onDrop={onDrop}
blockNode