fix(web): fix issue of tags component flickering when fisrt paint night theme bookshelf

This commit is contained in:
Xwite committed 2024-10-03 09:20:40 +08:00
1 parent f048952d73
commit caeb54e213
5 files changed
+43 -40

No files matched your search

+7
View File
@@ -112,5 +112,12 @@ export const useBookStore = defineStore("book", {
if (!this.bookProgress) return Promise.resolve();
return API.saveBookProgress(this.bookProgress);
},
//读取阅读界面配置以初始化夜间模式 以免初次加载书架页面时闪屏
async loadReadConfig() {
return API.getReadConfig().then(response => response.data)
.then(({isSuccess, data}) =>
isSuccess && this.setConfig(JSON.parse(data))
)
}
},
});