mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
This commit is contained in:
parent
e14ca5799b
commit
73505073e6
12 changed files with 42 additions and 59 deletions
|
|
@ -304,10 +304,6 @@ export const copyTab = (app: App, tab: Tab) => {
|
|||
} else if (!tab.model && tab.headElement) {
|
||||
const initData = JSON.parse(tab.headElement.getAttribute("data-initdata") || "{}");
|
||||
if (initData) {
|
||||
// 历史数据兼容 2023-05-24
|
||||
if (initData.scrollAttr) {
|
||||
initData.scrollAttr.rootId = initData.rootId;
|
||||
}
|
||||
model = newModelByInitData(app, newTab, initData);
|
||||
}
|
||||
}
|
||||
|
|
@ -320,7 +316,7 @@ export const closeTabByType = async (tab: Tab, type: "closeOthers" | "closeAll"
|
|||
if (type === "closeOthers") {
|
||||
for (let index = 0; index < tab.parent.children.length; index++) {
|
||||
if (tab.parent.children[index].id !== tab.id && !tab.parent.children[index].headElement.classList.contains("item--pin")) {
|
||||
await tab.parent.children[index].parent.removeTab(tab.parent.children[index].id, true, true, false);
|
||||
await tab.parent.children[index].parent.removeTab(tab.parent.children[index].id, true, false);
|
||||
index--;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue