⚡️ refactor(core): 优化管理视图布局与样式及文案调整
* 重构文件管理视图的渲染容器结构以增强布局灵活性 * 统一并扩展多类卡片组件的通用样式定义 * 更新取件码输入框的文案描述以匹配实际逻辑
This commit is contained in:
1 parent
006d2392cc
commit
8c0503a020
3 files changed
+31
-14
No files matched your search
@@ -1223,6 +1223,7 @@
|
||||
class="rounded-[24px] border px-3 py-3 shadow-md sm:px-4 sm:py-4"
|
||||
:class="[isDarkMode ? 'border-gray-700 bg-gray-700/30' : 'border-gray-200 bg-white']"
|
||||
>
|
||||
<div ref="lifecycleViewportRef" class="fcb-lifecycle-viewport">
|
||||
<TransitionGroup
|
||||
:css="false"
|
||||
tag="div"
|
||||
@@ -1302,6 +1303,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</TransitionGroup>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1858,6 +1860,7 @@ const syncMobileViewport = (event: MediaQueryListEvent) => {
|
||||
}
|
||||
const isLifecycleExpanded = ref(false)
|
||||
const lifecycleListRef = ref<HTMLElement | null>(null)
|
||||
const lifecycleViewportRef = ref<HTMLElement | null>(null)
|
||||
let lifecycleHeightAnimation: Animation | null = null
|
||||
const isRetrievalHistoryExpanded = ref(false)
|
||||
const retrievalTimelineEvents = computed(() =>
|
||||
@@ -1874,19 +1877,19 @@ const visibleDetailTimeline = computed(() =>
|
||||
|
||||
const animateLifecycleHeight = async () => {
|
||||
await nextTick()
|
||||
const list = lifecycleListRef.value
|
||||
if (!list || reducedMotionQuery.matches) return
|
||||
const currentHeight = list.getBoundingClientRect().height
|
||||
list.style.height = `${currentHeight}px`
|
||||
const viewport = lifecycleViewportRef.value
|
||||
if (!viewport || reducedMotionQuery.matches) return
|
||||
const currentHeight = viewport.getBoundingClientRect().height
|
||||
viewport.style.height = `${currentHeight}px`
|
||||
await nextTick()
|
||||
const targetHeight = list.scrollHeight
|
||||
const targetHeight = viewport.scrollHeight
|
||||
lifecycleHeightAnimation?.cancel()
|
||||
lifecycleHeightAnimation = list.animate(
|
||||
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', () => {
|
||||
list.style.height = ''
|
||||
viewport.style.height = ''
|
||||
lifecycleHeightAnimation = null
|
||||
}, { once: true })
|
||||
}
|
||||
@@ -2551,6 +2554,11 @@ onUnmounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.fcb-lifecycle-viewport {
|
||||
overflow: hidden;
|
||||
will-change: height;
|
||||
}
|
||||
|
||||
.fcb-lifecycle-list {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user