mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
811c95a91e
commit
d5c22ad08b
1 changed files with 15 additions and 1 deletions
|
|
@ -53,7 +53,21 @@ const focusStack = async (stack: IBackStack) => {
|
||||||
tab.addModel(editor);
|
tab.addModel(editor);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
wnd.addTab(tab);
|
if (window.siyuan.config.fileTree.openFilesUseCurrentTab) {
|
||||||
|
let unUpdateTab: Tab;
|
||||||
|
// 不能 reverse, 找到也不能提前退出循环,否则 https://github.com/siyuan-note/siyuan/issues/3271
|
||||||
|
wnd.children.forEach((item) => {
|
||||||
|
if (item.headElement && item.headElement.classList.contains("item--unupdate") && !item.headElement.classList.contains("item--pin")) {
|
||||||
|
unUpdateTab = item;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
wnd.addTab(tab);
|
||||||
|
if (unUpdateTab) {
|
||||||
|
wnd.removeTab(unUpdateTab.id);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
wnd.addTab(tab);
|
||||||
|
}
|
||||||
wnd.showHeading();
|
wnd.showHeading();
|
||||||
// 页签关闭
|
// 页签关闭
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue