Explorar o código

fix: 移除菜单选中动画 可能会引发卡顿

xyh %!s(int64=2) %!d(string=hai) anos
pai
achega
98e377f83c
Modificáronse 1 ficheiros con 3 adicións e 11 borrados
  1. 3 11
      packages/app/src/styles/antd.css

+ 3 - 11
packages/app/src/styles/antd.css

@@ -25,25 +25,17 @@
   border-radius: unset !important;
 }
 
-.ant-menu-item {
+.ant-menu-item-selected {
   position: relative;
 
   &::before {
     position: absolute;
-    top: 50%;
+    top: 0;
     right: 0;
-    bottom: 50%;
+    bottom: 0;
     width: 4px;
     content: '';
     background: var(--primary-color);
-    transition: top 150ms ease-in-out, bottom 150ms ease-in-out;
-  }
-}
-
-.ant-menu-item-selected {
-  &::before {
-    top: 0;
-    bottom: 0;
   }
 }