+
@@ -460,7 +585,7 @@ onUnmounted(() => {
{{ fileName }}
-
@@ -468,7 +593,7 @@ onUnmounted(() => {
-
@@ -514,7 +639,8 @@ onUnmounted(() => {
min-height: 200px;
position: relative;
- &.fill-height {
+ &.fill-height,
+ &.is-fullscreen {
height: 100%;
min-height: 0;
display: flex;
@@ -548,11 +674,15 @@ onUnmounted(() => {
overflow: auto;
}
- .preview-docx {
+ .preview-docx,
+ .preview-excel,
+ .preview-text {
display: flex;
flex-direction: column;
- .docx-container {
+ .docx-container,
+ .excel-container,
+ .code-preview {
flex: 1;
min-height: 0;
max-height: none;
@@ -591,28 +721,17 @@ onUnmounted(() => {
z-index: 2001;
background: var(--td-bg-color-container);
padding: 0;
- overflow-y: auto;
+ overflow: hidden;
.preview-toolbar {
- position: fixed;
- top: 12px;
- right: 32px;
- z-index: 2002;
- }
-
- /* Children use height: 100% rather than 100vh because carries a
- `zoom` multiplier for font-size control; 100vh resolves against the
- unscaled viewport and then gets scaled, overshooting the screen. The
- fullscreen container is already inset 0 on all sides, so 100% resolves
- to the true viewport height. */
- .preview-pdf {
- height: 100%;
+ padding: 12px 16px;
+ margin-bottom: 0;
}
.preview-pptx {
height: auto;
- min-height: 100%;
- overflow: visible;
+ min-height: 0;
+ overflow: auto;
border: none;
:deep(.pptx-preview-wrapper) {
@@ -621,57 +740,43 @@ onUnmounted(() => {
}
}
- .preview-docx {
- height: 100%;
- display: flex;
- flex-direction: column;
- .docx-container {
- max-height: 100%;
- height: 100%;
- flex: 1;
- }
- }
-
.preview-image {
- min-height: 100%;
display: flex;
justify-content: center;
align-items: center;
- .image-wrapper img {
- max-height: calc(100% - 80px);
- }
- }
-
- .preview-excel .excel-container,
- .preview-markdown,
- .preview-text .code-preview,
- .preview-html .code-preview {
- max-height: 100%;
- }
-
- .preview-html,
- .preview-video,
- .preview-mermaid {
- height: 100%;
}
}
.preview-toolbar {
- position: absolute;
- top: 8px;
- right: 24px;
- z-index: 10;
- background: var(--td-bg-color-container);
- border: 1px solid var(--td-component-border);
- border-radius: var(--td-radius-default);
- box-shadow: var(--td-shadow-1);
- padding: 4px;
- opacity: 0.6;
- transition: opacity 0.2s;
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ flex-shrink: 0;
+ min-width: 0;
+ padding: 8px 0;
+ margin-bottom: 8px;
+ border-bottom: 1px solid @border-color;
+ background: @bg-white;
+}
- &:hover {
- opacity: 1;
- }
+.preview-toolbar-title {
+ flex: 1;
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ color: @text-primary;
+ font-size: 14px;
+ font-weight: 500;
+}
+
+.preview-toolbar-actions {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ justify-content: flex-end;
+ gap: 8px;
+ margin-left: auto;
}
// ── States ──
@@ -772,6 +877,7 @@ onUnmounted(() => {
// ── Image ──
.preview-image {
+ overflow: auto;
display: flex;
justify-content: center;
padding: 20px 0;