From a1e178c3d79fcd2969a5d20c98160a289aff00a0 Mon Sep 17 00:00:00 2001 From: landaiqing <3517283258@qq.com> Date: Sun, 5 May 2024 14:10:26 +0800 Subject: [PATCH] feat: update --- src/components/HomeIndex/index.tsx | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/components/HomeIndex/index.tsx b/src/components/HomeIndex/index.tsx index a88df25..c53a59c 100644 --- a/src/components/HomeIndex/index.tsx +++ b/src/components/HomeIndex/index.tsx @@ -17,9 +17,7 @@ const HomeIndex: React.FC = () => { r: -8, h: 160, w: (el: any) => { - if (el) { - return Math.max(320, el.parentNode.offsetWidth * 0.55) - } + return Math.max(320, el.parentNode.offsetWidth * 0.55) }, }, @@ -31,9 +29,7 @@ const HomeIndex: React.FC = () => { r: 15, h: 360, w: (el: any) => { - if (el) { - return Math.max(220, el.parentNode.offsetWidth * 0.3) - } + return Math.max(220, el.parentNode.offsetWidth * 0.3) }, }, @@ -45,9 +41,7 @@ const HomeIndex: React.FC = () => { r: 6, h: 300, w: (el: any) => { - if (el) { - return Math.max(330, el.parentNode.offsetWidth * 0.55) - } + return Math.max(330, el.parentNode.offsetWidth * 0.55) }, }, @@ -59,9 +53,7 @@ const HomeIndex: React.FC = () => { r: -5, h: 400, w: (el: any) => { - if (el) { - return Math.max(305, el.parentNode.offsetWidth * 0.45) - } + return Math.max(305, el.parentNode.offsetWidth * 0.45) }, }, @@ -73,9 +65,7 @@ const HomeIndex: React.FC = () => { r: -20, h: 525, w: (el: any) => { - if (el) { - return Math.max(160, el.parentNode.offsetWidth * 0.3) - } + return Math.max(160, el.parentNode.offsetWidth * 0.3) }, }, @@ -87,9 +77,7 @@ const HomeIndex: React.FC = () => { r: 10, h: 160, w: (el: any) => { - if (el) { - return Math.max(320, el.parentNode.offsetWidth * 0.55) - } + return Math.max(320, el.parentNode.offsetWidth * 0.55) }, }, ]