From de4b510c00453c954b1eb57a1118816bededf673 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Mon, 15 Jun 2026 14:35:17 +0800 Subject: [PATCH] =?UTF-8?q?refactor(article-component):=20=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2swiper=E4=B8=BAscroll-view=E5=AE=9E=E7=8E=B0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=BB=9A=E5=8A=A8=EF=BC=8C=E4=BC=98=E5=8C=96=E7=B4=A7?= =?UTF-8?q?=E5=87=91=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 将原swiper自动滚动方案替换为scroll-view实现,支持item自然高度,不再强制等高,解决短item下方留白问题 2. 新增连贯滚动和步进滚动两种自动滚动模式,适配不同场景需求 3. 修复H5端rpx单位不兼容问题,统一内联样式单位转换逻辑 4. 优化滚动容器高度计算,根据配置显示数量动态计算窗口高度 5. 新增触摸暂停恢复逻辑,提升用户交互体验 --- components-diy/diy-article.vue | 460 ++++++++++++++++++++++++++------- 1 file changed, 366 insertions(+), 94 deletions(-) diff --git a/components-diy/diy-article.vue b/components-diy/diy-article.vue index be9fbcf..c0dc0de 100644 --- a/components-diy/diy-article.vue +++ b/components-diy/diy-article.vue @@ -3,53 +3,58 @@ - - - - - - - - + + + + + + + + + {{ item.article_title }} + + {{ item.article_abstract }} + + + {{ tn }} + + + + + {{ item.category_name }} + + + + {{ item.read_num || 0 }} - - {{ item.article_title }} - - {{ item.article_abstract }} - - - {{ tn }} - - - - - {{ item.category_name }} - - - - {{ item.read_num || 0 }} - - - - {{ item.dianzan_num || 0 }} - - {{ $util.timeStampTurnTime(item.create_time, 'date') }} - + + + {{ item.dianzan_num || 0 }} + {{ $util.timeStampTurnTime(item.create_time, 'date') }} - - + +