feat(ui): 添加粒子背景组件支持

- 在非星空背景模式下引入 ParticlesBg 组件
- 配置粒子数量、缓动效果及颜色适配暗色主题
- 设置粒子静态值并启用刷新功能
- 导入 ParticlesBg 组件并注册使用
This commit is contained in:
coolxitech
2025-12-17 22:02:47 +08:00
parent 4aa4d9d350
commit b166babf12

View File

@@ -331,6 +331,14 @@
<RouterView class="h-full" />
</StarsBackground>
<div v-else class="h-full">
<ParticlesBg
class="absolute inset-0"
:quantity="100"
:ease="100"
:color="isDark ? '#FFF' : '#000'"
:staticity="10"
refresh
/>
<RouterView class="h-full" />
</div>
</div>
@@ -458,6 +466,7 @@
import { migrateGameData } from '@/utils/migration'
import { checkLatestVersion } from '@/utils/versionCheck'
import {StarsBackground} from "@/components/ui/bg-stars";
import {ParticlesBg} from "@/components/ui/particles-bg";
// 执行数据迁移(在 store 初始化之前)
migrateGameData()