From 5ae3ad9590a2a4affedffac899c0abeee2983adf Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Fri, 15 May 2026 14:27:38 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E5=8A=A0=E8=BD=BD=E5=8A=A8=E7=94=BB?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/活动页/竞品H5与性能优化分析.md | 2 +- src/components/LoadingSpinner.vue | 2 +- src/styles/global.css | 16 ++++++++++++++++ src/views/Activities/DailyRecharge/index.vue | 8 +++++--- src/views/Activities/LesserBairam/index.vue | 6 ++++-- src/views/Activities/LoginReward/index.vue | 8 +++++--- .../Activities/LuckyDollars/Season3/index.vue | 6 ++++-- .../Activities/LuckyDollars/Season4/index.vue | 6 ++++-- .../Activities/LuckyDollars/Season5/index.vue | 6 ++++-- src/views/Activities/PokerAce/index.vue | 6 ++++-- src/views/Activities/SpringFestival/index.vue | 8 +++++--- src/views/Ranking/Couple/index.vue | 8 +++++--- src/views/Ranking/GamesKing/index.vue | 15 +++++---------- src/views/Ranking/KingAndQueen/TopList.vue | 8 +++++--- src/views/Ranking/Overall/Ranking.vue | 6 ++++-- src/views/Ranking/WeeklyStar/WeeklyStar.vue | 8 +++++--- 16 files changed, 77 insertions(+), 42 deletions(-) diff --git a/docs/活动页/竞品H5与性能优化分析.md b/docs/活动页/竞品H5与性能优化分析.md index efbdbd6..0de895a 100644 --- a/docs/活动页/竞品H5与性能优化分析.md +++ b/docs/活动页/竞品H5与性能优化分析.md @@ -264,7 +264,7 @@ backdrop-filter 低端机模式和系统“减少动态效果”模式都不再暂停 `.scroll-wrapper` 这类跑马灯动画,避免 iOS 或低端安卓上排行榜、奖励列表、用户昵称等文本滚动完全不动。系统开启“减少动态效果”时,只暂停弹幕这类更重的装饰动画。 -同时,多个活动页和榜单页的 `isLoading` 预加载阶段已取消渲染 `BackgroundLayer`,只保留 `LoadingSpinner` 和 loading 文案,避免加载态和正式页面重复创建背景图层。 +同时,多个活动页和榜单页的 `isLoading` 预加载阶段已取消渲染 `BackgroundLayer`、背景图片和其他装饰节点,只保留 `LoadingSpinner` 和 loading 文案。两者统一包在 `.loading-content` 容器中,使用半透明黑底、8px 圆角和 10px 内边距,避免加载态和正式页面重复创建背景图层。 ### 10. 弹幕组件专项优化 diff --git a/src/components/LoadingSpinner.vue b/src/components/LoadingSpinner.vue index b1ce084..7e84926 100644 --- a/src/components/LoadingSpinner.vue +++ b/src/components/LoadingSpinner.vue @@ -17,7 +17,7 @@ defineProps({ }, margin: { type: String, - default: '0 auto 12px', + default: '0 auto', }, }) diff --git a/src/styles/global.css b/src/styles/global.css index 62d630e..63f6a79 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -34,3 +34,19 @@ html.reduce-motion-mode .barrage-item { transform: none !important; will-change: auto !important; } + +/* 统一 loading 内容容器,避免预加载阶段渲染额外背景或装饰节点。 */ +.loading-content { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 10px; + border-radius: 8px; + background: rgba(0, 0, 0, 0.4); +} + +.loading-content p { + margin: 0; + text-align: center; +} diff --git a/src/views/Activities/DailyRecharge/index.vue b/src/views/Activities/DailyRecharge/index.vue index c15d232..c715ba9 100644 --- a/src/views/Activities/DailyRecharge/index.vue +++ b/src/views/Activities/DailyRecharge/index.vue @@ -2,9 +2,11 @@
{{ t('loading') }}...
+{{ t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ t('loading') }}...
+{{ t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ t('loading') }}...
+{{ t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+{{ t('loading') }}...
+{{ t('loading') }}...
+{{ $t('loading') }}...
+{{ $t('loading') }}...
+