From 5d4bfee41675b10bebce896784efef7ee5cba1bf Mon Sep 17 00:00:00 2001 From: longjieli <1060695654@qq.com> Date: Mon, 19 Aug 2024 14:14:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/luckyAnimation/luckyAnimation.vue | 2 +- components/virtualScroll/virtualScroll.vue | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/components/luckyAnimation/luckyAnimation.vue b/components/luckyAnimation/luckyAnimation.vue index 7fa74c8..f075579 100644 --- a/components/luckyAnimation/luckyAnimation.vue +++ b/components/luckyAnimation/luckyAnimation.vue @@ -50,7 +50,7 @@ .loader { height: 15px; aspect-ratio: 4; - --_g: no-repeat radial-gradient(farthest-side, #aec438 90%, #0000); + --_g: no-repeat radial-gradient(farthest-side, #000, 90%, #0000); background: var(--_g) left, var(--_g) right; diff --git a/components/virtualScroll/virtualScroll.vue b/components/virtualScroll/virtualScroll.vue index f63ccd0..28cf411 100644 --- a/components/virtualScroll/virtualScroll.vue +++ b/components/virtualScroll/virtualScroll.vue @@ -36,49 +36,49 @@ "process": 0.0000, "planNo": "BP2022060701", "endDate": "2022-06-07", - "type": "砌块", + "type": "block", "startDate": "2022-06-07" }, { "process": 0.0000, "planNo": "WP2022061301", "endDate": "2022-06-13", - "type": "墙板", + "type": "wallboard", "startDate": "2022-06-13" }, { "process": 0.0000, "planNo": "WP2022061301", "endDate": "2022-06-13", - "type": "墙板", + "type": "wallboard", "startDate": "2022-06-13" }, { "process": 0.0000, "planNo": "WP2022061301", "endDate": "2022-06-13", - "type": "墙板", + "type": "wallboard", "startDate": "2022-06-13" }, { "process": 0.0000, "planNo": "WP2022061301", "endDate": "2022-06-13", - "type": "墙板", + "type": "wallboard", "startDate": "2022-06-13" }, { "process": 0.0000, "planNo": "WP2022061301", "endDate": "2022-06-13", - "type": "墙板", + "type": "wallboard", "startDate": "2022-06-13" }, { "process": 0.0000, "planNo": "WP2022061301", "endDate": "2022-06-13", - "type": "墙板", + "type": "wallboard", "startDate": "2022-06-13" } ], @@ -178,7 +178,11 @@ // 假设设计稿宽度为750rpx const designWidth = 750; // 屏幕宽度,单位为px - const screenWidth = systemInfo.screenWidth; + let screenWidth = systemInfo.screenWidth; + //防止屏幕过大时转换的值太大。超过960就设置screenWidth为版心宽度 + if(screenWidth > 960){ + screenWidth = 375 + } // 计算1rpx等于多少px const rpxToPx = screenWidth / (designWidth / rpx); console.log(rpxToPx);