From 27614f19ddb366548730bb65d78c9ecfd09a7ad5 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 03:25:16 +0000 Subject: [PATCH] style: format code with Prettier and StandardJS This commit fixes the style issues introduced in b7fa021 according to the output from Prettier and StandardJS. Details: None --- src/pages/layout/proSecNav/index.jsx | 2 +- src/pages/motion/index.jsx | 39 +++++++++++++--------------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/src/pages/layout/proSecNav/index.jsx b/src/pages/layout/proSecNav/index.jsx index 6963434c..88bfa8df 100644 --- a/src/pages/layout/proSecNav/index.jsx +++ b/src/pages/layout/proSecNav/index.jsx @@ -45,7 +45,7 @@ const ProSecNav = () => { useEffect(() => { const selectedPathKey = pathname setSelectedKeys([selectedPathKey]) - setOpenKeys(isOpenChange ? openKeys : (pathSubmenu[pathname] ?? openKeys)) + setOpenKeys(isOpenChange ? openKeys : pathSubmenu[pathname] ?? openKeys) }, [pathname, openKeys, isOpenChange]) const onOpenChange = (keys) => { diff --git a/src/pages/motion/index.jsx b/src/pages/motion/index.jsx index 27ecfa6c..f66cc690 100644 --- a/src/pages/motion/index.jsx +++ b/src/pages/motion/index.jsx @@ -59,7 +59,7 @@ const easeNames = [ ] const randomSort = (arr) => { - let newArr = [] + const newArr = [] const len = arr.length for (let i = 0; i < len; i++) { const random = Math.floor(Math.random() * arr.length) @@ -118,7 +118,7 @@ const ParallaxVert = () => { rotate: 45, // 旋转45度 opacity: 0.5, // 不透明度设置为0.5 }} - > + /> { rotate: 0, x: '200px', }} - > + /> { duration: 2, }} variants={animations} - initial={'hidden'} - animate={'show'} - > + initial="hidden" + animate="show" + /> { onClick={() => { setRotate(!isRotated) }} - > + />
{ onDragStart={(event, info) => console.log(info.point.x, info.point.y)} onDragEnd={(event, info) => console.log(info.point.x, info.point.y)} onDirectionLock={(axis) => console.log('axis', axis)} - dragSnapToOrigin={true} + dragSnapToOrigin // dragConstraints={{ left: 0, right: 300 }} dragConstraints={constraintsRef} - // dragElastic={false} - // dragElastic={0.8} - // dragPropagation={false} - > + />
{ setIsAnimation(false) console.log('Completed animating', definition) }} - > + />
{ duration: 1, repeat: Infinity, }} - > + />
{ backgroundColor: 'white', borderRadius: 60, }} - > + />
{ onTap={() => { setButtonState(!buttonRight) }} - > + /> { onTap={() => { setButtonState(!buttonRight) }} - > + /> { backgroundColor: '#fff', borderRadius: 10, }} - > + /> { backgroundColor: '#fff', borderRadius: 10, }} - > + />
@@ -718,7 +715,7 @@ const ParallaxVert = () => { backgroundColor: 'black', borderRadius: 60, }} - > + /> 黑点和文字都设置了layout
@@ -756,7 +753,7 @@ const ParallaxVert = () => { backgroundColor: 'black', borderRadius: 60, }} - > + /> 黑点和文字都未设置layout