style(ui): 引入苹果风格主题与全局样式层
Azure Static Web Apps CI/CD / Close Pull Request Job (push) Skipped
Azure Static Web Apps CI/CD / Build and Deploy Job (push) Failing after 16s
Build and Deploy / build (push) Failing after 15m47s

新增 apple.scss 全局覆盖层:半透明材质顶栏/抽屉、细描边卡片、按压式按钮反馈、系统字体与尺寸相关字距;材质与描边均派生自 Vuetify 主题变量,浅色主题不受影响。

定义 Apple System Colors 暗色主题色板替代默认 Material 暗色;移除原有发光、径向高光与上浮悬停等装饰性动效,缓动曲线统一为 Apple 风格。
This commit is contained in:
2026-10-24 01:49:28 +08:00
committed by trae-solo-agent
parent c7fdc11dbd
commit 5aaa39d292
7 changed files with 464 additions and 289 deletions
+5 -4
View File
@@ -42,20 +42,21 @@ onMounted(() => {
@import "@/styles/index.scss";
@import "@/styles/transitions.scss";
@import "@/styles/global.scss";
@import "@/styles/apple.scss";
.md3-enter-active,
.md3-leave-active {
transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
transition: opacity 0.28s cubic-bezier(0.32, 0.72, 0, 1),
transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
}
.md3-enter-from {
opacity: 0;
transform: translateX(0.5vw);
transform: scale(0.995);
}
.md3-leave-to {
opacity: 0;
transform: translateX(-0.5vw);
transform: scale(0.995);
}
</style>
+42 -1
View File
@@ -9,11 +9,52 @@ import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/styles'
// Composables
import {createVuetify} from 'vuetify'
import { createVuetify } from 'vuetify'
/**
* 苹果风格暗色主题
* 参考 Apple Human Interface Guidelines 的 System Colors (Dark)
* 说明:仅替换色板,不改变任何组件行为或数据流
*/
const appleDark = {
dark: true,
colors: {
// 结构层
background: '#000000',
surface: '#1C1C1E',
'surface-variant': '#2C2C2E',
'surface-bright': '#3A3A3C',
'on-background': '#F5F5F7',
'on-surface': '#F5F5F7',
'on-surface-variant': '#C7C7CC',
// 语义色(Apple System Colors, Dark)
primary: '#0A84FF',
'primary-darken-1': '#0060DF',
secondary: '#98989D',
'secondary-darken-1': '#636366',
success: '#30D158',
'success-darken-1': '#248A3D',
warning: '#FF9F0A',
'warning-darken-1': '#C93400',
error: '#FF453A',
'error-darken-1': '#D70015',
info: '#64D2FF',
'info-darken-1': '#0A84FF',
// 覆盖默认灰阶,让描边卡片 / 分割线更接近系统灰
'grey-darken-2': '#48484A',
'grey-darken-3': '#3A3A3C',
'grey-darken-4': '#2C2C2E',
},
}
// https://vuetifyjs.com/en/introduction/why-vuetify/#feature-guides
export default createVuetify({
theme: {
defaultTheme: 'dark',
themes: {
dark: appleDark,
},
},
})
+309
View File
@@ -0,0 +1,309 @@
/**
* src/styles/apple.scss
*
* 苹果风格全局样式层(克制版)
* ---------------------------------------------------------------------------
* 只做视觉覆盖:材质、层次、圆角、排版、按压反馈。
* 不涉及任何组件逻辑、数据流或交互行为。
* 设计原则:去发光、去悬浮位移;用半透明材质表达层次;按压给即时物理反馈。
*
* 材质与描边均由 Vuetify 主题变量派生,因此暗色下即为苹果暗色规范,
* 浅色下会自动取到对应的浅色值,浅色主题保持原样不被破坏。
*/
/* ---------------------------------------------------------------------------
0. 设计变量
--------------------------------------------------------------------------- */
:root {
--apple-ease: cubic-bezier(0.32, 0.72, 0, 1); /* 近似 Apple 弹性缓出 */
--apple-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
/* 描边与材质:跟随主题取色,暗色下等价于 rgba(255,255,255,.08) / rgba(28,28,30,.72) */
--apple-hairline: rgba(var(--v-border-color), 0.08);
--apple-hairline-strong: rgba(var(--v-border-color), 0.18);
--apple-material: rgba(var(--v-theme-surface), 0.72);
--apple-material-thick: rgba(var(--v-theme-surface), 0.86);
--apple-fill-hover: rgba(var(--v-theme-on-surface), 0.05);
--apple-fill-active: rgba(var(--v-theme-on-surface), 0.09);
--apple-radius-sm: 8px;
--apple-radius: 12px;
--apple-radius-lg: 16px;
/* 悬浮层投影:仅暗色使用,浅色保留 Vuetify 原有的轻投影 */
--apple-shadow-card: 0 2px 6px rgba(0, 0, 0, 0.34), 0 12px 32px rgba(0, 0, 0, 0.26);
--apple-shadow-popover: 0 16px 40px rgba(0, 0, 0, 0.5);
--apple-shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.55);
}
/* ---------------------------------------------------------------------------
1. 排版:系统字体、抗锯齿、尺寸相关的字距与行高
--------------------------------------------------------------------------- */
.v-application {
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display',
'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}
/* 字距随字号变化:大标题收紧,正文保持为 0(中文尤其不适合正字距) */
.v-application .text-h2 {
letter-spacing: -0.02em;
line-height: 1.12;
}
.v-application .text-h3 {
letter-spacing: -0.018em;
line-height: 1.15;
}
.v-application .text-h4 {
letter-spacing: -0.016em;
line-height: 1.2;
}
.v-application .text-h5,
.v-application .text-h6 {
letter-spacing: -0.012em;
line-height: 1.25;
}
/* ---------------------------------------------------------------------------
2. 顶栏与抽屉:半透明材质,内容可从下方穿过
--------------------------------------------------------------------------- */
.v-app-bar.v-toolbar {
background: var(--apple-material) !important;
-webkit-backdrop-filter: saturate(180%) blur(20px);
backdrop-filter: saturate(180%) blur(20px);
box-shadow: none !important;
border-bottom: 1px solid var(--apple-hairline);
transition: background-color 0.3s var(--apple-ease-out);
}
.v-app-bar .v-toolbar-title {
font-weight: 600;
letter-spacing: -0.01em;
}
.v-navigation-drawer {
background: var(--apple-material-thick) !important;
-webkit-backdrop-filter: saturate(180%) blur(24px);
backdrop-filter: saturate(180%) blur(24px);
border-right: 1px solid var(--apple-hairline) !important;
box-shadow: none !important;
}
/* ---------------------------------------------------------------------------
3. 卡片:细描边 + 极浅投影,悬停只做轻微提亮,不做位移
--------------------------------------------------------------------------- */
.v-card {
border-radius: var(--apple-radius);
transition: background-color 0.22s var(--apple-ease-out),
border-color 0.22s var(--apple-ease-out),
box-shadow 0.22s var(--apple-ease-out);
}
/* 重投影只在暗色下使用,浅色主题保持原有阴影不变 */
.v-theme--dark.v-card--variant-elevated {
box-shadow: var(--apple-shadow-card) !important;
}
.v-card--variant-tonal {
border: 1px solid var(--apple-hairline);
}
/* 可点击卡片的悬停反馈:提亮填充 + 描边加深,替代原来的上浮与发光 */
.v-card.cursor-pointer,
.v-card[class*='cursor-pointer'] {
cursor: pointer;
}
.v-card.cursor-pointer:hover {
background-color: var(--apple-fill-hover) !important;
border-color: var(--apple-hairline-strong) !important;
}
.v-card.cursor-pointer:active {
background-color: var(--apple-fill-active) !important;
transition-duration: 0.08s;
}
.v-card.cursor-not-allowed {
opacity: 0.6;
}
/* ---------------------------------------------------------------------------
4. 按钮与芯片:即时按压反馈,去掉大写转换与宽字距
--------------------------------------------------------------------------- */
.v-btn {
text-transform: none;
letter-spacing: 0;
font-weight: 500;
border-radius: 10px;
transition: transform 0.14s var(--apple-ease-out),
background-color 0.2s var(--apple-ease-out),
box-shadow 0.2s var(--apple-ease-out),
opacity 0.2s var(--apple-ease-out);
}
.v-btn:active {
transform: scale(0.97);
transition-duration: 0.08s;
}
.v-theme--dark.v-btn--variant-elevated {
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.32) !important;
}
.v-btn-group,
.v-btn-toggle {
border-radius: 12px;
overflow: hidden;
}
/* 芯片本身已是胶囊形,这里只统一字重与字距,避免覆盖组件内自定义圆角 */
.v-chip {
font-weight: 500 !important;
letter-spacing: 0 !important;
}
/* ---------------------------------------------------------------------------
5. 对话框、菜单与提示:材质化 + 轻量分隔
--------------------------------------------------------------------------- */
/* 注意:Vuetify 的悬浮层结构为 .v-overlay > .v-overlay__content > 内容 */
.v-dialog > .v-overlay__content > .v-card,
.v-dialog > .v-overlay__content > .v-sheet {
border-radius: var(--apple-radius-lg) !important;
border: 1px solid var(--apple-hairline);
}
.v-dialog.v-theme--dark > .v-overlay__content > .v-card,
.v-dialog.v-theme--dark > .v-overlay__content > .v-sheet {
box-shadow: var(--apple-shadow-modal) !important;
}
.v-menu > .v-overlay__content > .v-sheet,
.v-menu > .v-overlay__content > .v-list,
.v-select__content.v-overlay__content > .v-sheet,
.v-select__content.v-overlay__content > .v-list {
background: var(--apple-material-thick) !important;
-webkit-backdrop-filter: saturate(180%) blur(24px);
backdrop-filter: saturate(180%) blur(24px);
border: 1px solid var(--apple-hairline);
border-radius: var(--apple-radius) !important;
}
.v-menu.v-theme--dark > .v-overlay__content > .v-sheet,
.v-menu.v-theme--dark > .v-overlay__content > .v-list,
.v-overlay.v-theme--dark > .v-overlay__content.v-select__content > .v-sheet,
.v-overlay.v-theme--dark > .v-overlay__content.v-select__content > .v-list {
box-shadow: var(--apple-shadow-popover) !important;
}
/* 提示气泡在明暗两套主题下都保持深色,与系统行为一致 */
.v-tooltip > .v-overlay__content {
border-radius: var(--apple-radius-sm) !important;
background: rgba(58, 58, 60, 0.94) !important;
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
font-size: 0.8rem;
letter-spacing: 0;
}
.v-alert {
border-radius: var(--apple-radius) !important;
}
.v-divider {
border-color: var(--apple-hairline) !important;
opacity: 1 !important;
}
/* 输入类控件:圆角与描边统一 */
.v-field {
border-radius: 10px !important;
}
.v-snackbar__wrapper > .v-sheet {
border-radius: var(--apple-radius) !important;
border: 1px solid var(--apple-hairline);
}
/* ---------------------------------------------------------------------------
6. 滚动条:细、半透明、悬停才明显
--------------------------------------------------------------------------- */
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background-color: rgba(var(--v-theme-on-surface), 0.16);
border: 3px solid transparent;
background-clip: content-box;
border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
background-color: rgba(var(--v-theme-on-surface), 0.3);
}
::-webkit-scrollbar-corner {
background: transparent;
}
/* ---------------------------------------------------------------------------
7. 键盘可达性:仅在键盘聚焦时显示柔和焦点环
--------------------------------------------------------------------------- */
.v-btn:focus-visible,
.v-chip:focus-visible,
a:focus-visible {
outline: 3px solid rgba(10, 132, 255, 0.55);
outline-offset: 2px;
}
/* ---------------------------------------------------------------------------
8. 无障碍:减弱动效 / 减弱透明 / 提高对比
--------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
.v-btn:active,
.v-card.cursor-pointer:active {
transform: none !important;
}
.v-card,
.v-btn {
transition: background-color 0.15s linear, border-color 0.15s linear !important;
}
}
@media (prefers-reduced-transparency: reduce) {
.v-app-bar.v-toolbar,
.v-navigation-drawer {
background: rgb(var(--v-theme-surface)) !important;
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
.v-menu > .v-overlay__content > .v-sheet,
.v-menu > .v-overlay__content > .v-list,
.v-select__content.v-overlay__content > .v-sheet,
.v-select__content.v-overlay__content > .v-list {
background: rgb(var(--v-theme-surface)) !important;
-webkit-backdrop-filter: none;
backdrop-filter: none;
}
}
@media (prefers-contrast: more) {
.v-app-bar.v-toolbar,
.v-navigation-drawer {
background: rgb(var(--v-theme-surface)) !important;
border-color: rgba(var(--v-border-color), 0.32) !important;
}
}
+6 -13
View File
@@ -1,18 +1,17 @@
// 全局 UI 美化样式
// 卡片悬浮效果
// 卡片悬停效果(克制:只提亮,不位移)
.hover-card {
transition: transform 0.2s ease, box-shadow 0.3s ease;
will-change: transform, box-shadow;
transition: background-color 0.22s var(--apple-ease-out),
border-color 0.22s var(--apple-ease-out);
&:hover, &:focus {
transform: translateY(-4px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
background-color: var(--apple-fill-hover);
border-color: var(--apple-hairline-strong);
}
&:active {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
background-color: rgba(255, 255, 255, 0.09);
}
}
@@ -78,12 +77,6 @@ html {
// 全屏模式样式
.fullscreen-mode {
.v-app-bar {
background-color: rgba(var(--v-theme-surface-variant), 0.85) !important;
-webkit-backdrop-filter: blur(10px);
backdrop-filter: blur(10px);
}
.main-window {
padding-top: 16px;
padding-bottom: 16px;
+13 -12
View File
@@ -1,28 +1,29 @@
// 悬停反馈:以轻微提亮替代发光(保留类名,避免影响引用方)
.glow-effect {
transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
transition: background-color 0.22s var(--apple-ease-out), transform 0.14s var(--apple-ease-out);
&:hover {
box-shadow: 0 0 15px rgba(var(--v-theme-primary), 0.5);
transform: translateY(-2px);
background-color: var(--apple-fill-hover);
}
&:active {
transform: scale(0.98);
}
}
.glow-text {
text-shadow: 0 0 5px rgba(var(--v-theme-primary), 0.5);
color: rgb(var(--v-theme-on-surface));
}
.bloom-container {
.v-card {
transition: box-shadow 0.3s ease;
&:hover {
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1), 0 0 15px rgba(var(--v-theme-primary), 0.3) !important;
}
transition: background-color 0.22s var(--apple-ease-out),
border-color 0.22s var(--apple-ease-out);
}
.v-btn {
transition: box-shadow 0.3s ease;
&:hover {
box-shadow: 0 0 10px rgba(var(--v-theme-primary), 0.4);
}
transition: background-color 0.2s var(--apple-ease-out),
transform 0.14s var(--apple-ease-out);
}
}
+62 -233
View File
@@ -1,105 +1,37 @@
@use 'glow.scss';
// 添加卡片发光效果
// 数据更新高亮:柔和的聚焦环,替代原来的霓虹发光
.glow-track {
position: relative;
overflow: hidden;
transition: all 0.3s ease;
&::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: radial-gradient(circle at var(--x, 50%) var(--y, 50%),
rgba(255, 255, 255, 0.15) 0%,
rgba(255, 255, 255, 0) 70%);
opacity: 0;
transition: opacity 0.3s;
pointer-events: none;
z-index: 1;
}
&:hover::before {
opacity: 1;
}
transition: background-color 0.22s var(--apple-ease-out),
border-color 0.22s var(--apple-ease-out);
}
// 数据更新高亮效果
.glow-highlight {
animation: glow-pulse 3s ease-in-out;
box-shadow: 0 0 20px rgba(33, 150, 243, 0.6),
0 0 40px rgba(33, 150, 243, 0.4),
0 0 60px rgba(33, 150, 243, 0.2) !important;
animation: highlight-fade 2.4s var(--apple-ease-out);
border-color: rgba(10, 132, 255, 0.75) !important;
}
@keyframes glow-pulse {
0%, 100% {
box-shadow: 0 0 20px rgba(33, 150, 243, 0.6),
0 0 40px rgba(33, 150, 243, 0.4),
0 0 60px rgba(33, 150, 243, 0.2);
}
50% {
box-shadow: 0 0 30px rgba(33, 150, 243, 0.8),
0 0 60px rgba(33, 150, 243, 0.6),
0 0 90px rgba(33, 150, 243, 0.4);
}
}
// 添加卡片悬浮效果
.grid-item .v-card {
transition: transform 0.3s ease, box-shadow 0.3s ease;
&:hover {
transform: translateY(-4px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}
&:active {
transform: translateY(-2px);
}
}
// 添加空科目卡片样式
.empty-subject-card {
transition: all 0.3s ease;
opacity: 0.8;
&:hover {
opacity: 1;
transform: translateY(-4px);
}
}
// 修改防烧屏提示卡片,使用 tonal 样式减少信息密度
.anti-burn-card {
animation: subtle-glow 4s infinite alternate;
transition: all 0.3s ease;
&:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}
}
@keyframes subtle-glow {
@keyframes highlight-fade {
0% {
box-shadow: 0 0 5px rgba(33, 150, 243, 0.1);
box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.45);
}
60% {
box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.35);
}
100% {
box-shadow: 0 0 15px rgba(33, 150, 243, 0.3);
box-shadow: 0 0 0 0 rgba(10, 132, 255, 0);
}
}
// 出勤管理对话框样式
.attendance-stat {
height: 100%;
// 防烧屏提示卡片:静态呈现,不再呼吸发光
.anti-burn-card {
transition: background-color 0.22s var(--apple-ease-out);
}
// 搜索建议按钮
.suggestion-btn {
margin: 2px;
@@ -111,25 +43,6 @@
}
}
// 适配触摸屏
@media (hover: none) {
.student-card .attendance-actions {
opacity: 1;
}
}
// 小屏幕适配
@media (max-width: 600px) {
.student-card {
.attendance-actions .v-btn {
margin: 0 1px;
min-width: 28px;
width: 28px;
height: 28px;
}
}
}
// 过滤器芯片
.filter-chip {
cursor: pointer;
@@ -140,6 +53,7 @@
}
}
// 网格瀑布流布局(功能相关,勿改数值)
.grid-masonry {
display: grid;
grid-template-columns: repeat(3, 1fr);
@@ -152,18 +66,31 @@
.grid-item {
width: 100%;
transition: all 0.2s ease;
}
.empty-card {
transform: scale(0.9);
opacity: 0.8;
grid-row-end: span 1 !important;
// 空科目卡片
.empty-subject-card {
cursor: pointer;
transition: background-color 0.22s var(--apple-ease-out),
border-color 0.22s var(--apple-ease-out);
opacity: 0.85;
}
.empty-card:hover {
transform: scale(0.95);
.empty-subject-card:hover {
opacity: 1;
border-color: var(--apple-hairline-strong) !important;
}
.empty-subjects-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 16px;
padding: 8px;
}
.empty-subjects {
border-top: 1px solid var(--apple-hairline);
padding-top: 1rem;
}
.empty-subjects-container {
@@ -171,40 +98,6 @@
flex-wrap: wrap;
}
@media (max-width: 1199px) {
.grid-masonry {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 799px) {
.grid-masonry {
grid-template-columns: 1fr;
}
.empty-card {
transform: scale(0.95);
}
}
/* 优化滚动条样式 */
.main-window::-webkit-scrollbar {
width: 8px;
}
.main-window::-webkit-scrollbar-track {
background: transparent;
}
.main-window::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.2);
border-radius: 4px;
}
.main-window::-webkit-scrollbar-thumb:hover {
background-color: rgba(0, 0, 0, 0.3);
}
.no-data-message {
display: flex;
justify-content: center;
@@ -213,40 +106,35 @@
margin: 20px 0;
}
// 出勤抽屉
.attendance-drawer {
border-left: 1px solid rgba(0, 0, 0, 0.12);
border-left: 1px solid var(--apple-hairline);
}
.attendance-drawer :deep(.v-navigation-drawer__content) {
overflow-y: auto;
}
/* 优化滚动条样式 */
.attendance-drawer :deep(.v-navigation-drawer__content::-webkit-scrollbar) {
width: 8px;
.attendance-card {
display: flex;
flex-direction: column;
}
.attendance-drawer
:deep(.v-navigation-drawer__content::-webkit-scrollbar-track) {
background: transparent;
.attendance-numbers {
padding: 20px 0;
}
.attendance-drawer
:deep(.v-navigation-drawer__content::-webkit-scrollbar-thumb) {
background-color: rgba(0, 0, 0, 0.2);
border-radius: 4px;
.total-number {
border-bottom: 1px solid var(--apple-hairline);
padding-bottom: 20px;
}
.attendance-drawer
:deep(.v-navigation-drawer__content::-webkit-scrollbar-thumb:hover) {
background-color: rgba(0, 0, 0, 0.3);
.status-number {
flex: 1;
}
/* 响应式调整 */
@media (max-width: 960px) {
.attendance-drawer {
display: none;
}
.attendance-stat {
height: 100%;
}
.text-success {
@@ -261,71 +149,22 @@
color: rgb(var(--v-theme-warning));
}
.attendance-card {
display: flex;
flex-direction: column;
// 响应式调整
@media (max-width: 1199px) {
.grid-masonry {
grid-template-columns: repeat(2, 1fr);
}
}
.attendance-numbers {
padding: 20px 0;
@media (max-width: 960px) {
.attendance-drawer {
display: none;
}
}
.total-number {
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
padding-bottom: 20px;
}
.status-number {
flex: 1;
}
.text-h2,
.text-h3 {
line-height: 1.2;
}
.empty-subjects-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 16px;
padding: 8px;
}
.empty-subject-card {
cursor: pointer;
transition: all 0.2s ease;
opacity: 0.8;
}
.empty-subject-card:hover {
transform: scale(1.02);
opacity: 1;
}
.empty-subjects {
border-top: 1px solid rgba(0, 0, 0, 0.12);
padding-top: 1rem;
}
.empty-subject-card:not(:disabled):hover {
opacity: 1;
transform: scale(1.02);
}
// 出勤管理对话框样式
.attendance-stat {
height: 100%;
}
// 搜索建议按钮
.suggestion-btn {
margin: 2px;
min-width: 0;
padding: 0 6px;
&:active {
transform: scale(0.95);
@media (max-width: 799px) {
.grid-masonry {
grid-template-columns: 1fr;
}
}
@@ -347,13 +186,3 @@
}
}
}
// 过滤器芯片
.filter-chip {
cursor: pointer;
margin: 2px;
&:active {
transform: scale(0.95);
}
}
+27 -26
View File
@@ -1,9 +1,9 @@
// Material Design 3 动画曲线
$emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1.0);
$emphasized-accelerate: cubic-bezier(0.3, 0.0, 0.8, 0.15);
$standard-easing: cubic-bezier(0.2, 0.0, 0, 1.0);
$standard-decelerate: cubic-bezier(0.0, 0.0, 0.0, 1.0);
$standard-accelerate: cubic-bezier(0.3, 0.0, 1.0, 1.0);
// Apple 风格缓动曲线:收敛、平稳、无回弹
$emphasized-decelerate: cubic-bezier(0.16, 1, 0.3, 1);
$emphasized-accelerate: cubic-bezier(0.4, 0.0, 0.7, 1);
$standard-easing: cubic-bezier(0.32, 0.72, 0, 1);
$standard-decelerate: cubic-bezier(0.16, 1, 0.3, 1);
$standard-accelerate: cubic-bezier(0.4, 0.0, 1.0, 1.0);
// 网格项目的进入和离开动画
.grid-item {
@@ -37,11 +37,12 @@ $standard-accelerate: cubic-bezier(0.3, 0.0, 1.0, 1.0);
// 空科目卡片动画
.empty-subject-card {
transition: all 250ms $standard-easing;
transition: background-color 250ms $standard-easing,
border-color 250ms $standard-easing;
&:hover {
transform: translateY(-4px) scale(1.02);
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
&:active {
transform: scale(0.99);
transition-duration: 90ms;
}
}
@@ -57,7 +58,7 @@ $standard-accelerate: cubic-bezier(0.3, 0.0, 1.0, 1.0);
.v-list-enter-from,
.v-list-leave-to {
opacity: 0;
transform: translateX(-24px);
transform: translateX(-10px);
}
// 出勤数据变化动画
@@ -169,55 +170,55 @@ $standard-accelerate: cubic-bezier(0.3, 0.0, 1.0, 1.0);
// 网格项目过渡
.grid-enter-active,
.grid-leave-active {
transition: all 0.5s ease;
transition: opacity 0.3s $standard-easing, transform 0.3s $standard-easing;
}
.grid-enter-from {
opacity: 0;
transform: translateY(20px);
transform: translateY(8px);
}
.grid-leave-to {
opacity: 0;
transform: translateY(-20px);
transform: translateY(-8px);
}
// 列表项目过渡
.v-list-enter-active,
.v-list-leave-active {
transition: all 0.3s ease;
transition: opacity 0.3s $standard-easing, transform 0.3s $standard-easing;
}
.v-list-enter-from {
opacity: 0;
transform: translateX(-20px);
transform: translateX(-10px);
}
.v-list-leave-to {
opacity: 0;
transform: translateX(20px);
transform: translateX(10px);
}
// 页面过渡
.page-enter-active,
.page-leave-active {
transition: opacity 0.3s, transform 0.3s;
transition: opacity 0.3s $standard-easing, transform 0.3s $standard-easing;
}
.page-enter-from {
opacity: 0;
transform: translateY(20px);
transform: translateY(8px);
}
.page-leave-to {
opacity: 0;
transform: translateY(-20px);
transform: translateY(-8px);
}
// 淡入淡出
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.3s;
transition: opacity 0.3s $standard-easing;
}
.fade-enter-from,
@@ -228,27 +229,27 @@ $standard-accelerate: cubic-bezier(0.3, 0.0, 1.0, 1.0);
// 缩放过渡
.scale-enter-active,
.scale-leave-active {
transition: all 0.3s;
transition: opacity 0.3s $standard-easing, transform 0.3s $standard-easing;
}
.scale-enter-from,
.scale-leave-to {
opacity: 0;
transform: scale(0.9);
transform: scale(0.96);
}
// Slide X Transition
.slide-x-transition-enter-active,
.slide-x-transition-leave-active {
transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.5, 1), opacity 0.3s ease;
transition: transform 0.3s $standard-easing, opacity 0.3s $standard-easing;
}
.slide-x-transition-enter-from {
transform: translateX(15px);
transform: translateX(10px);
opacity: 0;
}
.slide-x-transition-leave-to {
transform: translateX(-15px);
transform: translateX(-10px);
opacity: 0;
}