fix(App): 修复路由切换时的页面过渡动画

- 为 Transition 组件中的 div 元素正确绑定 key 属性
- 移除 main.css 中冗余的 tailwindcss 和 tw-animate-css 导入
- 确保页面切换时动画效果正常显示
This commit is contained in:
coolxitech
2025-12-17 22:55:18 +08:00
parent 310372b8e2
commit 97db1324b6
2 changed files with 1 additions and 4 deletions

View File

@@ -320,7 +320,7 @@
<!-- 内容区域 --> <!-- 内容区域 -->
<main class="flex-1 overflow-y-auto"> <main class="flex-1 overflow-y-auto">
<Transition name="page" mode="out-in"> <Transition name="page" mode="out-in">
<div key=$route.fullPath class="h-full"> <div :key="$route.fullPath" class="h-full">
<StarsBackground <StarsBackground
v-if="isDark" v-if="isDark"
:factor="0.05" :factor="0.05"

View File

@@ -1,6 +1,3 @@
@import "tailwindcss";
@import "tw-animate-css";
@custom-variant dark (&:is(.dark *)); @custom-variant dark (&:is(.dark *));
:root { :root {