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

This commit is contained in:
jxxghp
2025-05-12 11:23:48 +08:00
parent 5686c6fe65
commit f435b4fc52

View File

@@ -82,6 +82,7 @@ function updateHtmlThemeAttribute(themeName: string) {
async function fetchBackgroundImages() {
try {
backgroundImages.value = await api.get(`/login/wallpapers`)
activeImageIndex.value = 0
} catch (e) {
console.error(e)
}