This commit is contained in:
lyswhut
2023-01-06 14:39:44 +08:00
parent 1db54195f5
commit 27c1bf8eb6
30 changed files with 196 additions and 85 deletions
+4 -1
View File
@@ -22,7 +22,10 @@ export const buildBgUrl = (originUrl: string, dataPath: string): string => {
}
export const getThemes = (callback: (themeInfo: LX.ThemeInfo) => void) => {
if (themeInfo.themes.length) return callback(themeInfo)
if (themeInfo.themes.length) {
callback(themeInfo)
return
}
void getTheme().then(info => {
themeInfo.themes = markRaw(info.themes)
themeInfo.userThemes = shallowReactive(info.userThemes)