mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-15 11:38:06 +01:00
This commit is contained in:
parent
a79d399f0a
commit
305c247069
1 changed files with 6 additions and 4 deletions
|
|
@ -787,10 +787,12 @@ export class Wnd {
|
|||
if (window.siyuan.storage[Constants.LOCAL_CLOSED_TABS].length > Constants.SIZE_UNDO) {
|
||||
window.siyuan.storage[Constants.LOCAL_CLOSED_TABS].pop();
|
||||
}
|
||||
const tabJSON = {};
|
||||
layoutToJSON(item, tabJSON);
|
||||
window.siyuan.storage[Constants.LOCAL_CLOSED_TABS].push(tabJSON);
|
||||
setStorageVal(Constants.LOCAL_CLOSED_TABS, window.siyuan.storage[Constants.LOCAL_CLOSED_TABS]);
|
||||
if (item.headElement) {
|
||||
const tabJSON = {};
|
||||
layoutToJSON(item, tabJSON);
|
||||
window.siyuan.storage[Constants.LOCAL_CLOSED_TABS].push(tabJSON);
|
||||
setStorageVal(Constants.LOCAL_CLOSED_TABS, window.siyuan.storage[Constants.LOCAL_CLOSED_TABS]);
|
||||
}
|
||||
if (item.model instanceof Custom && item.model.beforeDestroy) {
|
||||
item.model.beforeDestroy();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue