This commit is contained in:
Vanessa 2023-01-04 15:37:37 +08:00
parent c0b63dffe9
commit 324ccc60c8
3 changed files with 27 additions and 24 deletions

View file

@ -139,7 +139,7 @@ export const hotKey2Electron = (key: string) => {
return electronKey + key.substr(key.length - 1);
};
export const getLocalStorage = () => {
export const getLocalStorage = (cb:()=>void) => {
fetchPost("/api/storage/getLocalStorage", undefined, (response) => {
window.siyuan.storage = response.data;
// 历史数据迁移
@ -212,6 +212,7 @@ export const getLocalStorage = () => {
window.siyuan.storage[key] = defaultStorage[key];
}
});
cb();
});
};