mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 07:30:12 +01:00
This commit is contained in:
parent
97af8f874b
commit
0dde702ba6
5 changed files with 30 additions and 15 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import {Tab} from "./Tab";
|
||||
import {getInstanceById, newModelByInitData} from "./util";
|
||||
import {exportLayout, getInstanceById, newModelByInitData} from "./util";
|
||||
import {getAllModels, getAllTabs} from "./getAll";
|
||||
import {hideAllElements, hideElements} from "../protyle/ui/hideElements";
|
||||
import {pdfResize} from "../asset/renderAssets";
|
||||
|
|
@ -84,7 +84,7 @@ export const switchTabByIndex = (index: number) => {
|
|||
};
|
||||
|
||||
let resizeTimeout: number;
|
||||
export const resizeTabs = () => {
|
||||
export const resizeTabs = (setLayout = true) => {
|
||||
clearTimeout(resizeTimeout);
|
||||
// .layout .fn__flex-shrink {width .15s cubic-bezier(0, 0, .2, 1) 0ms} 时需要再次计算 padding
|
||||
// PDF 避免分屏多次调用后,页码跳转到1 https://github.com/siyuan-note/siyuan/issues/5646
|
||||
|
|
@ -117,6 +117,13 @@ export const resizeTabs = () => {
|
|||
});
|
||||
pdfResize();
|
||||
hideAllElements(["gutter"]);
|
||||
if (setLayout) {
|
||||
exportLayout({
|
||||
reload: false,
|
||||
onlyData: false,
|
||||
errorExit: false
|
||||
});
|
||||
}
|
||||
}, 200);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue