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