Files
SearcjGal-frontend/src/components/AnimatedBackground.vue
AdingApkgg 42608f50c1 Update package dependencies and refactor components for improved performance and consistency
- Replaced `vue-virtual-scroll-list` with `@tanstack/vue-virtual` in package.json for enhanced virtual scrolling capabilities.
- Refactored multiple components to utilize CSS transitions instead of JavaScript animations, improving performance and simplifying code.
- Updated transition classes in `AnimatedBackground.vue`, `CommentsModal.vue`, `KeyboardHelpPanel.vue`, `SettingsModal.vue`, `VndbPanel.vue`, and others for a more cohesive user experience.
- Removed unnecessary animation functions and streamlined component structures for better maintainability.
2025-12-26 22:53:20 +08:00

27 lines
664 B
Vue

<template>
<Transition
enter-active-class="duration-[1500ms] ease-in-out"
enter-from-class="opacity-0"
enter-to-class="opacity-100"
leave-active-class="duration-[1500ms] ease-in-out"
leave-from-class="opacity-100"
leave-to-class="opacity-0"
>
<div
v-if="imageUrl"
:key="imageKey"
class="absolute inset-0 bg-cover bg-center bg-no-repeat will-change-transform gpu-layer"
:class="kenBurnsClass"
:style="{ backgroundImage: `url(${imageUrl})` }"
/>
</Transition>
</template>
<script setup lang="ts">
defineProps<{
imageUrl: string
imageKey: string | number
kenBurnsClass: string
}>()
</script>