在 fetchBackgroundImages 函数中初始化 activeImageIndex 为 0,以确保背景图片加载时的索引正确。

This commit is contained in:
jxxghp
2025-05-12 11:23:48 +08:00
parent 5686c6fe65
commit f435b4fc52
+1
View File
@@ -82,6 +82,7 @@ function updateHtmlThemeAttribute(themeName: string) {
async function fetchBackgroundImages() { async function fetchBackgroundImages() {
try { try {
backgroundImages.value = await api.get(`/login/wallpapers`) backgroundImages.value = await api.get(`/login/wallpapers`)
activeImageIndex.value = 0
} catch (e) { } catch (e) {
console.error(e) console.error(e)
} }