fix(amis-saas-9320): page取消选中后默认以根节点收集面板数据,避免左侧组件物料面板为空

Change-Id: I9343d4e1c54c348c3601af1534c286db36f50054
This commit is contained in:
wibetter 2023-01-16 14:15:57 +08:00
parent 1a713bedfd
commit 963f49583d

View File

@ -469,6 +469,10 @@ export class EditorManager {
let id = curRendererId || this.store.activeId;
let panels: Array<BasicPanelItem> = [];
if (!id && this.store?.schema) {
id = this.store?.schema.$$id; // 默认使用根节点id
}
if (id || this.store.selections.length) {
id = id || this.store.selections[0];
const node = this.store.getNodeById(id);