shenwu 2 anos atrás
pai
commit
5bdcfe40a6
1 arquivos alterados com 3 adições e 11 exclusões
  1. 3 11
      src/pages/launchSystemNew/adq/index.tsx

+ 3 - 11
src/pages/launchSystemNew/adq/index.tsx

@@ -96,22 +96,14 @@ function Adq() {
             }
         }
     }, [queryParmas, selectedArr])
-    // 初始跳转到自己的名称
-    useEffect(() => {
-        if (userAll?.length > 0 && userInfo?.userId) {
-            let topEq = userAll?.findIndex((item: any) => item.key == userInfo?.userId)
-            let em: any = document.getElementById('myMenus')
-            if (em) {
-                em.scrollTop = 52 * topEq - 36
-            }
-        }
-    }, [userInfo?.userId, userAll])
+    // // 初始跳转到自己的名称
     useEffect(() => {
         if (userAll?.length > 0 && userId) {
             let topEq = userAll?.findIndex((item: any) => item.key == userId)
             let em: any = document.getElementById('myMenus')
+            console.log(topEq)
             if (em) {
-                em.scrollTop = 52 * topEq - 36
+                em.scrollTop = (52-4) * topEq
             }
         }
     }, [userId, userAll])