Commit eea86f1a by weiw

fix:docx文件预览样式

parent 2c69520a
...@@ -5,6 +5,37 @@ ...@@ -5,6 +5,37 @@
margin-bottom: 0px !important; margin-bottom: 0px !important;
height: 100% !important; height: 100% !important;
box-shadow: none !important; box-shadow: none !important;
overflow-x: auto !important;
}
.docx-document h1,
.docx-document h2,
.docx-document h3,
.docx-document h4,
.docx-document h5,
.docx-document h6 {
word-wrap: break-word;
word-break: break-word;
line-height: 1.4;
margin: 0.8em 0;
}
.docx-document p {
word-wrap: break-word;
word-break: break-word;
line-height: 1.6;
}
/* 确保表格内容也能正确换行 */
.docx-document table {
table-layout: fixed;
width: 100%;
}
.docx-document table td,
.docx-document table th {
word-wrap: break-word;
} }
.docx-document-wrapper { .docx-document-wrapper {
......
...@@ -184,7 +184,7 @@ export const FilePreviewModal: React.FC<FilePreviewModalProps> = ({ isOpen, onCl ...@@ -184,7 +184,7 @@ export const FilePreviewModal: React.FC<FilePreviewModalProps> = ({ isOpen, onCl
onClose={handleClose} // 使用改进的关闭函数 onClose={handleClose} // 使用改进的关闭函数
size="3xl" size="3xl"
classNames={{ classNames={{
base: 'max-h-[90vh] max-w-[80vw]', base: 'max-h-[90vh] max-w-[60vw]',
body: 'py-4', body: 'py-4',
header: 'border-b border-divider', header: 'border-b border-divider',
footer: 'border-t border-divider', footer: 'border-t border-divider',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment