fix: FilePreview iframe高度撑满 + 手机端响应式布局

This commit is contained in:
2026-05-24 22:25:50 +08:00
parent fbd029a7fe
commit 3823f70714
7 changed files with 69 additions and 6 deletions
+4 -4
View File
@@ -37,17 +37,17 @@
<!-- Preview content -->
<div class="flex-1 overflow-auto p-6 bg-slate-50/50">
<!-- HTML Preview -->
<div v-if="normalizedFileType === 'html'" class="bg-white rounded-2xl shadow-xl overflow-hidden border border-orange-200/30">
<div v-if="normalizedFileType === 'html'" class="bg-white rounded-2xl shadow-xl overflow-hidden border border-orange-200/30 flex flex-col" style="min-height: 500px;">
<iframe
ref="iframeRef"
:srcdoc="content"
class="w-full h-full min-h-[500px]"
class="w-full flex-1"
sandbox="allow-same-origin"
></iframe>
</div>
<!-- Markdown Preview -->
<div v-else-if="normalizedFileType === 'md'" class="bg-white rounded-2xl shadow-xl p-8 border border-orange-200/30 prose max-w-none prose-orange">
<div v-else-if="normalizedFileType === 'md'" class="bg-white rounded-2xl shadow-xl p-8 border border-orange-200/30 prose max-w-none prose-orange flex-1 overflow-auto" style="min-height: 500px;">
<div v-html="renderedMarkdown"></div>
</div>
@@ -56,7 +56,7 @@
<iframe
v-if="pdfUrl"
:src="pdfUrl"
class="w-full flex-1 min-h-[500px]"
class="w-full flex-1"
type="application/pdf"
></iframe>
<div v-else class="flex items-center justify-center h-full">