From 7e830d9dcb39406af7b6f79f03f89941740f979e Mon Sep 17 00:00:00 2001 From: "DESKTOP-RQ919RC\\Pc" <1300399510@qq.com> Date: Thu, 18 Dec 2025 18:57:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E6=BA=A2=E5=87=BA=E9=97=AE=E9=A2=98=E5=B9=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改CSS以解决图片容器溢出问题 - 使用flex布局优化图片排列 - 更新静态资源路径为动态变量 - 隐藏示例项目并启用动态列表渲染 --- component/hot-tag/hot-tag.js | 2 +- css/public.css | 11 +++++++---- css/public.less | 10 ++++++++-- css/section.css | 4 ++++ sectionV2.html | 36 ++++++++++++++++++++++++++++-------- 5 files changed, 48 insertions(+), 15 deletions(-) diff --git a/component/hot-tag/hot-tag.js b/component/hot-tag/hot-tag.js index cee5c1b..b5e0e6d 100644 --- a/component/hot-tag/hot-tag.js +++ b/component/hot-tag/hot-tag.js @@ -29,5 +29,5 @@ export const hotTag = defineComponent({ components: {}, - template: `
热门标签
{{ item.tagname }}
`, + template: `
热门标签
{{ item.tagname }}
`, }); diff --git a/css/public.css b/css/public.css index 1502e41..e192590 100644 --- a/css/public.css +++ b/css/public.css @@ -57,6 +57,7 @@ body { border-radius: 10px; padding: 18px 20px 0; display: block; + overflow: hidden; } .item-box .item-head { margin-bottom: 14px; @@ -246,8 +247,12 @@ body { display: block; } .item-box.item-forum .picture { - overflow: auto; + overflow-x: auto; + display: flex; + flex-wrap: nowrap; + gap: 10px; margin-bottom: 15px; + max-width: 100%; } .item-box.item-forum .picture .picture-videos { position: relative; @@ -263,9 +268,7 @@ body { height: 100px; border-radius: 10px; display: block; -} -.item-box.item-forum .picture .picture-item:not(:last-child) { - margin-right: 10px; + flex-shrink: 0; } .item-box.item-offer { font-size: 14px; diff --git a/css/public.less b/css/public.less index d5777d9..8da3d62 100644 --- a/css/public.less +++ b/css/public.less @@ -293,8 +293,13 @@ body { } .picture { - overflow: auto; + overflow-x: auto; + // white-space: nowrap; + display: flex; + flex-wrap: nowrap; + gap: 10px; margin-bottom: 15px; + max-width: 100%; .picture-videos { position: relative; @@ -313,9 +318,10 @@ body { height: 100px; border-radius: 10px; display: block; + flex-shrink: 0; &:not(:last-child) { - margin-right: 10px; + // margin-right: 10px; } } } diff --git a/css/section.css b/css/section.css index 592abee..8f3595c 100644 --- a/css/section.css +++ b/css/section.css @@ -76,6 +76,9 @@ border-radius: 16px; z-index: -1; } +#sectionIndex .matter .matter-content { + min-width: 0; +} #sectionIndex .matter .matter-content .info-box { width: 100%; background: -webkit-linear-gradient(270.53908529deg, #ffffff 2%, #ebf8f9 98%); @@ -208,6 +211,7 @@ margin-right: 12px; position: sticky; z-index: 1; + min-width: 0; } #sectionIndex .matter .matter-content .details-box .content-box .selectives-box { width: 100%; diff --git a/sectionV2.html b/sectionV2.html index 6f79445..f1ea38a 100644 --- a/sectionV2.html +++ b/sectionV2.html @@ -267,7 +267,7 @@
-
+
- + --> +