⚡️ refactor(core): 优化 UI 交互体验与列表高度动画逻辑
* 引入 fcb-secondary-card 样式类统一卡片视觉表现 * 增强卡片悬停效果与过渡动画平滑度 * 优化 FileManageView 高度切换的动画计算逻辑 * 修正列表组件样式类以适配新的交互规范
This commit is contained in:
1 parent
8c0503a020
commit
29c2fd9cb8
4 files changed
+26
-5
No files matched your search
@@ -113,6 +113,8 @@ textarea {
|
||||
border-color: rgba(113, 153, 168, 0.68);
|
||||
box-shadow: 0 20px 44px rgba(4, 10, 14, 0.46);
|
||||
}
|
||||
.fcb-secondary-card { transition: all 300ms ease !important; box-shadow: -8px -8px 20px rgba(255,255,255,.8), 8px 8px 20px rgba(163,177,198,.5) !important; }
|
||||
.fcb-secondary-card:hover { transform: translateY(-2px); background: #f0f4f8 !important; box-shadow: -10px -10px 25px rgba(255,255,255,.9), 10px 10px 25px rgba(163,177,198,.6) !important; }
|
||||
|
||||
.data-table-2026 thead th {
|
||||
background: rgba(236, 244, 246, 0.76);
|
||||
@@ -466,6 +468,20 @@ html, body, #app { background: var(--fcb-bg); color: var(--fcb-text); }
|
||||
border-color: transparent !important;
|
||||
box-shadow: -10px -10px 25px rgba(255,255,255,.9), 10px 10px 25px rgba(163,177,198,.6) !important;
|
||||
}
|
||||
|
||||
/* Keep every dashboard card on the same 300ms pastel hover curve. */
|
||||
.theme-2026-card-hover {
|
||||
transition: all 300ms ease !important;
|
||||
}
|
||||
.theme-2026-card-hover:hover {
|
||||
background: #f0f4f8 !important;
|
||||
border-color: transparent !important;
|
||||
box-shadow: -10px -10px 25px rgba(255,255,255,.9), 10px 10px 25px rgba(163,177,198,.6) !important;
|
||||
}
|
||||
.dark .theme-2026-card-hover:hover {
|
||||
background: #2f414a !important;
|
||||
box-shadow: -10px -10px 25px rgba(69,88,99,.45), 10px 10px 25px rgba(10,18,23,.55) !important;
|
||||
}
|
||||
input:not([type=file]), select, textarea { background: var(--fcb-surface) !important; color: var(--fcb-text) !important; border-color: #d5e1e5 !important; box-shadow: var(--fcb-shadow-in); }
|
||||
button, a { border-radius: 14px; }
|
||||
button:not(:disabled), a { cursor: pointer; }
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<article
|
||||
v-for="record in records"
|
||||
:key="record.id"
|
||||
class="rounded-xl bg-opacity-50 p-4 shadow-md transition duration-200 hover:shadow-lg"
|
||||
class="fcb-secondary-card rounded-xl bg-opacity-50 p-4 shadow-md transition duration-300 hover:shadow-lg"
|
||||
:class="[isDarkMode ? 'bg-gray-800 hover:bg-gray-700' : 'bg-gray-100 hover:bg-white']"
|
||||
>
|
||||
<div class="flex min-w-0 items-center gap-3">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<article
|
||||
v-for="record in records"
|
||||
:key="record.id"
|
||||
class="rounded-xl bg-opacity-50 p-4 shadow-md transition duration-200 hover:shadow-lg"
|
||||
class="fcb-secondary-card rounded-xl bg-opacity-50 p-4 shadow-md transition duration-300 hover:shadow-lg"
|
||||
:class="[isDarkMode ? 'bg-gray-800 hover:bg-gray-700' : 'bg-gray-100 hover:bg-white']"
|
||||
>
|
||||
<div class="flex min-w-0 items-center gap-3">
|
||||
|
||||
@@ -1879,19 +1879,24 @@ const animateLifecycleHeight = async () => {
|
||||
await nextTick()
|
||||
const viewport = lifecycleViewportRef.value
|
||||
if (!viewport || reducedMotionQuery.matches) return
|
||||
lifecycleHeightAnimation?.cancel()
|
||||
lifecycleHeightAnimation = null
|
||||
viewport.style.height = ''
|
||||
await nextTick()
|
||||
const currentHeight = viewport.getBoundingClientRect().height
|
||||
viewport.style.height = `${currentHeight}px`
|
||||
await nextTick()
|
||||
const targetHeight = viewport.scrollHeight
|
||||
lifecycleHeightAnimation?.cancel()
|
||||
lifecycleHeightAnimation = viewport.animate(
|
||||
[{ height: `${currentHeight}px` }, { height: `${targetHeight}px` }],
|
||||
{ duration: 420, easing: 'cubic-bezier(0.22, 1, 0.36, 1)', fill: 'forwards' }
|
||||
)
|
||||
lifecycleHeightAnimation.addEventListener('finish', () => {
|
||||
const cleanup = () => {
|
||||
viewport.style.height = ''
|
||||
lifecycleHeightAnimation = null
|
||||
}, { once: true })
|
||||
}
|
||||
lifecycleHeightAnimation.addEventListener('finish', cleanup, { once: true })
|
||||
lifecycleHeightAnimation.addEventListener('cancel', cleanup, { once: true })
|
||||
}
|
||||
|
||||
const LIFECYCLE_ENTER_MS = 160
|
||||
|
||||
Reference in new issue
Block a user