mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-10 03:24:12 +00:00
chore: 清理冗余代码与配置,优化项目结构
1. 删除无用文件与废弃代码:移除locale枚举、element-plus插件、sse路由、api token模块等 2. 简化类型导入与依赖:移除大量未使用的类型导入,统一echarts导入方式 3. 优化配置与样式:调整gitignore、样式引入顺序,新增列表动画样式 4. 修复接口与模型:修正接口返回类型、查询参数配置,更新部门模型字段 5. 优化性能与体验:添加图片懒加载,优化加载逻辑与表格渲染 6. 调整环境配置:新增并更新开发/生产环境配置文件
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
// 列表项入场动画
|
||||
// 使用 stagger 实现逐项淡入上移效果
|
||||
|
||||
// 单一项入场
|
||||
@keyframes fa-fade-in-up {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(12px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fa-fade-in {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes fa-slide-in-right {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
// 逐项动画混入 — 子项按 index 延迟入场
|
||||
// 使用方式:在列表容器上应用 .fa-stagger-enter
|
||||
.fa-stagger-enter {
|
||||
> * {
|
||||
animation: fa-fade-in-up 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
|
||||
}
|
||||
|
||||
@for $i from 1 through 20 {
|
||||
> *:nth-child(#{$i}) {
|
||||
animation-delay: #{$i * 0.05}s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 淡入类
|
||||
.fa-fade-enter {
|
||||
animation: fa-fade-in 0.3s ease both;
|
||||
}
|
||||
|
||||
// 右滑入类
|
||||
.fa-slide-right-enter {
|
||||
animation: fa-slide-in-right 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
|
||||
}
|
||||
|
||||
// Vue Transition 使用的类名
|
||||
.fa-list-enter-active {
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.fa-list-leave-active {
|
||||
position: absolute; // 让离开动画不影响其他元素布局
|
||||
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.fa-list-enter-from {
|
||||
opacity: 0;
|
||||
transform: translateY(12px);
|
||||
}
|
||||
|
||||
.fa-list-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateX(-12px);
|
||||
}
|
||||
|
||||
.fa-list-move {
|
||||
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
$bg-animation-color-light: #000;
|
||||
$bg-animation-color-dark: #fff;
|
||||
$bg-animation-duration: 0.5s;
|
||||
$bg-animation-easing: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
||||
html {
|
||||
--bg-animation-color: #{$bg-animation-color-light};
|
||||
@@ -10,13 +11,13 @@ html {
|
||||
--bg-animation-color: #{$bg-animation-color-dark};
|
||||
}
|
||||
|
||||
// View transition styles
|
||||
// View transition styles — 圆形展开/收拢过渡
|
||||
&::view-transition-old(*) {
|
||||
animation: none;
|
||||
}
|
||||
|
||||
&::view-transition-new(*) {
|
||||
animation: clip $bg-animation-duration ease-in both;
|
||||
animation: clip $bg-animation-duration $bg-animation-easing both;
|
||||
}
|
||||
|
||||
&::view-transition-old(root) {
|
||||
@@ -29,7 +30,7 @@ html {
|
||||
|
||||
&.dark {
|
||||
&::view-transition-old(*) {
|
||||
animation: clip $bg-animation-duration ease-in reverse both;
|
||||
animation: clip $bg-animation-duration $bg-animation-easing reverse both;
|
||||
}
|
||||
|
||||
&::view-transition-new(*) {
|
||||
|
||||
Reference in New Issue
Block a user