From 3464bc7907ad083c0155cf841dafff7209ad7628 Mon Sep 17 00:00:00 2001 From: oneao Date: Tue, 28 Apr 2026 22:14:22 +0800 Subject: [PATCH] u --- code/file-preview/g3-file/index.css | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/code/file-preview/g3-file/index.css b/code/file-preview/g3-file/index.css index aa6278ff..f883932c 100644 --- a/code/file-preview/g3-file/index.css +++ b/code/file-preview/g3-file/index.css @@ -38,9 +38,10 @@ flex: 1; min-height: 0; padding: 10px; - overflow: auto; + overflow-y: auto; + overflow-x: hidden; display: grid; - grid-template-columns: repeat(2, 1fr); + grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: flex-start; box-sizing: border-box; @@ -148,6 +149,7 @@ .g3-file-item { flex: none; width: 100%; + min-width: 0; position: relative; cursor: pointer; border: 1px solid #eef0f2; @@ -171,8 +173,11 @@ } .g3-file-preview .g3-file-img { + display: block; width: 100%; height: 100%; + object-fit: fill; + min-width: 0; } .g3-file-preview svg { @@ -182,11 +187,14 @@ .g3-file-preview .g3-img-container { width: 100%; + max-width: 100%; + min-width: 0; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; + overflow: hidden; } .g3-file-preview .g3-img-container.is-error .g3-img-error { @@ -475,7 +483,7 @@ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - max-width: 250px; + margin-left: 12px; } .g3-preview-content {