mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
♻️ 内核退出
This commit is contained in:
parent
91786010d3
commit
73263ca128
6 changed files with 11 additions and 8 deletions
|
|
@ -145,7 +145,7 @@ export const resetLayout = () => {
|
|||
});
|
||||
};
|
||||
|
||||
export const exportLayout = (reload: boolean, cb?: () => void, onlyData = false) => {
|
||||
export const exportLayout = (reload: boolean, cb?: () => void, onlyData = false, errorExit = false) => {
|
||||
const useElement = document.querySelector("#barDock use");
|
||||
if (!useElement) {
|
||||
return;
|
||||
|
|
@ -161,7 +161,10 @@ export const exportLayout = (reload: boolean, cb?: () => void, onlyData = false)
|
|||
if (onlyData) {
|
||||
return layoutJSON;
|
||||
}
|
||||
fetchPost("/api/system/setUILayout", {layout: layoutJSON}, () => {
|
||||
fetchPost("/api/system/setUILayout", {
|
||||
layout: layoutJSON,
|
||||
errorExit // 后台不接受该参数,用于请求发生错误时退出程序
|
||||
}, () => {
|
||||
if (reload) {
|
||||
window.location.reload();
|
||||
} else if (cb) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue