mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
🚨
This commit is contained in:
parent
62cbcf63e5
commit
25ddad5957
9 changed files with 14 additions and 15 deletions
|
|
@ -427,17 +427,17 @@ export class Wnd {
|
|||
this.removeTab(this.children[0].id);
|
||||
} else if (this.children.length > 5) { // TODO: 需从后台设置中获取
|
||||
let removeId: string;
|
||||
let openTime: string
|
||||
let openTime: string;
|
||||
this.children.forEach((item, index) => {
|
||||
if (item.headElement.classList.contains("item--pin") || item.headElement.classList.contains("item--focus") || index === oldFocusIndex) {
|
||||
return;
|
||||
}
|
||||
if (!openTime) {
|
||||
openTime = item.headElement.getAttribute("data-opentime")
|
||||
removeId = this.children[index].id
|
||||
openTime = item.headElement.getAttribute("data-opentime");
|
||||
removeId = this.children[index].id;
|
||||
} else if (item.headElement.getAttribute("data-opentime") < openTime) {
|
||||
openTime = item.headElement.getAttribute("data-opentime")
|
||||
removeId = this.children[index].id
|
||||
openTime = item.headElement.getAttribute("data-opentime");
|
||||
removeId = this.children[index].id;
|
||||
}
|
||||
});
|
||||
if (removeId) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue