feat(ui): UI/交互优化 — 动画系统+Design Token+骨架屏+微反馈
1. Design Token 统一:CategoryIcon/BudgetBar/Numpad/Skeleton/TransactionItem 硬编码hex颜色替换为 $primary/$border/$danger 等SCSS变量 2. 入场动画:mixins.scss 添加 fade-in-up/bounce-in/count-up 等 mixin+keyframes, 首页卡片/金额/快捷按钮应用交错入场动画 3. 记账成功动画增强:SaveSuccess 增加纸屑粒子爆发+光环脉冲效果, prefers-reduced-motion 下自动隐藏 4. 骨架屏替代文字加载:recurring/group-manage/notifications 三个页面 从"加载中..."替换为骨架屏;空状态增加图标容器+引导文案 5. 交互微反馈:分类按压0.92缩放、推荐虚线呼吸动画、 Tab滑块cubic-bezier优化、快捷按钮弹性按压 6. 左滑删除提示:TransactionItem首项1.5s后自动微微左滑再回弹, 引导用户发现滑动删除功能
This commit is contained in:
@@ -328,7 +328,11 @@ function goBack() {
|
||||
|
||||
.title { font-size: $font-xl; font-weight: 500; color: $text; }
|
||||
|
||||
.type-toggle-wrap { display: flex; justify-content: center; margin: $space-sm 0; }
|
||||
.type-toggle-wrap {
|
||||
display: flex; justify-content: center;
|
||||
margin: $space-sm 0;
|
||||
@include fade-in-up;
|
||||
}
|
||||
|
||||
.type-toggle {
|
||||
display: inline-flex;
|
||||
@@ -363,7 +367,7 @@ function goBack() {
|
||||
background: $surface;
|
||||
border-radius: $radius-lg;
|
||||
box-shadow: $shadow-sm;
|
||||
transition: transform $transition-normal;
|
||||
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.income .slider { transform: translateX(160rpx); }
|
||||
@@ -387,8 +391,9 @@ function goBack() {
|
||||
gap: 6rpx;
|
||||
padding: 12rpx 0;
|
||||
position: relative;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
|
||||
&:active { transform: scale(0.95); }
|
||||
&:active { transform: scale(0.92); }
|
||||
|
||||
&.suggested {
|
||||
.cat-icon-wrap {
|
||||
@@ -396,10 +401,16 @@ function goBack() {
|
||||
border-radius: $radius-lg;
|
||||
padding: 6rpx;
|
||||
margin: -6rpx;
|
||||
animation: suggest-pulse 2s ease-in-out infinite;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes suggest-pulse {
|
||||
0%, 100% { border-color: $primary; }
|
||||
50% { border-color: lighten($primary, 30%); }
|
||||
}
|
||||
|
||||
.cat-icon-wrap {
|
||||
position: relative;
|
||||
transition: all $transition-normal;
|
||||
|
||||
Reference in New Issue
Block a user