mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
🐛 当前页签没有激活时编辑器没有初始化
This commit is contained in:
parent
dc14da855a
commit
bf2bd552ff
1 changed files with 7 additions and 2 deletions
|
|
@ -411,8 +411,13 @@ export const layoutToJSON = (layout: Layout | Wnd | Tab | Model, json: any) => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else if (layout instanceof Tab) {
|
} else if (layout instanceof Tab) {
|
||||||
json.children = {};
|
if (layout.model) {
|
||||||
layoutToJSON(layout.model, json.children);
|
json.children = {};
|
||||||
|
layoutToJSON(layout.model, json.children);
|
||||||
|
} else {
|
||||||
|
// 当前页签没有激活时编辑器没有初始化
|
||||||
|
json.children = JSON.parse(layout.headElement.getAttribute("data-initdata")||"{}");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue