From 5ec2babc4434fa9a33968d3dc4bed7c925abb9b2 Mon Sep 17 00:00:00 2001 From: Megghy Date: Sat, 3 May 2025 07:08:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96ViewerLayout=E5=92=8C?= =?UTF-8?q?QuestionBoxView=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在ViewerLayout.vue中添加过渡模式以增强动画效果 - 更新QuestionBoxView.vue,调整问题头部间距,优化图片展示逻辑,修改上传图片网格样式,提升用户体验 --- src/views/ViewerLayout.vue | 15 +---- src/views/view/QuestionBoxView.vue | 102 ++++++++--------------------- 2 files changed, 28 insertions(+), 89 deletions(-) diff --git a/src/views/ViewerLayout.vue b/src/views/ViewerLayout.vue index 6b8706c..1a2f7a2 100644 --- a/src/views/ViewerLayout.vue +++ b/src/views/ViewerLayout.vue @@ -476,6 +476,7 @@ @@ -676,19 +677,7 @@ // --- 路由过渡动画 --- .fade-slide-enter-active, .fade-slide-leave-active { - transition: opacity 0.25s ease, transform 0.25s ease; - // 关键: 相对于 content-layout-container 定位 - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; // 让过渡元素也撑满容器高度 - // 关键: 保持内边距和盒模型一致 - padding: var(--vtsuru-content-padding); - box-sizing: border-box; - // 关键: 背景色防止透视 - background-color: var(--n-card-color); // 使用内容区的背景色 - z-index: 1; + transition: opacity 0.2s ease, transform 0.2s ease; } .fade-slide-enter-from { diff --git a/src/views/view/QuestionBoxView.vue b/src/views/view/QuestionBoxView.vue index 6aa19f4..9cf7588 100644 --- a/src/views/view/QuestionBoxView.vue +++ b/src/views/view/QuestionBoxView.vue @@ -26,6 +26,8 @@ import { NSpin, NIcon, useMessage, + NCarousel, + NCarouselItem, } from 'naive-ui' import { AddCircle24Regular, DismissCircle24Regular } from '@vicons/fluent' import { computed, onMounted, onUnmounted, ref } from 'vue' @@ -706,44 +708,10 @@ onUnmounted(() => {