mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
🚨
This commit is contained in:
parent
18415517bb
commit
fc08e01de2
5 changed files with 7 additions and 8 deletions
|
|
@ -137,12 +137,12 @@ export const setLocalStorage = () => {
|
|||
fetchPost("/api/system/getLocalStorage", undefined, (response) => {
|
||||
Object.keys(response.data).forEach(item => {
|
||||
window.localStorage.setItem(item, response.data[item]);
|
||||
})
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const exportLocalStorage = (cb: () => void) => {
|
||||
fetchPost("/api/system/setLocalStorage", {val: JSON.stringify(localStorage)}, (response) => {
|
||||
fetchPost("/api/system/setLocalStorage", {val: JSON.stringify(localStorage)}, () => {
|
||||
cb();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue