diff --git a/src/assets/css/components/common/sidebar.scss b/src/assets/css/components/common/sidebar.scss index 702af2a..ca67fd6 100644 --- a/src/assets/css/components/common/sidebar.scss +++ b/src/assets/css/components/common/sidebar.scss @@ -100,10 +100,21 @@ } .submenu { - display: none; + visibility: hidden; position: fixed; padding-left: 20px; z-index: 10000; + animation: 0.1s ease forwards; + @include mixins.unique-keyframes { + 0% { + transform: translateX(0); + opacity: 1; + } + 100% { + transform: translateX(-10px); + opacity: 0; + } + } .content { display: flex; @@ -144,7 +155,7 @@ } .submenu { - display: block; + visibility: visible; animation: 0.3s ease; @include mixins.unique-keyframes { 0% { @@ -185,6 +196,7 @@ display: flex; justify-content: center; align-items: center; + flex: 0 0 auto; margin-left: 4px; width: 36px; height: 36px; diff --git a/src/components/common/Sidebar/Scroll.tsx b/src/components/common/Sidebar/Scroll.tsx index e27f1c0..97ff649 100644 --- a/src/components/common/Sidebar/Scroll.tsx +++ b/src/components/common/Sidebar/Scroll.tsx @@ -1,33 +1,18 @@ import { PropsWithChildren } from 'react' -import HideScrollbar, { HideScrollbarElement } from '@/components/common/HideScrollbar' - -export interface SidebarScrollElement { - refreshLayout(): void -} - -const Scroll = forwardRef((props, ref) => { - useImperativeHandle(ref, () => { - return { - refreshLayout() { - hideScrollbarRef.current?.refreshLayout() - } - } - }) - - const hideScrollbarRef = useRef(null) +import HideScrollbar from '@/components/common/HideScrollbar' +const Scroll = (props: PropsWithChildren) => { return (
{props.children}
) -}) +} export default Scroll diff --git a/src/pages/System/Group.tsx b/src/pages/System/Group.tsx index 1d9e64e..d286e84 100644 --- a/src/pages/System/Group.tsx +++ b/src/pages/System/Group.tsx @@ -594,7 +594,7 @@ const Group = () => { ) const addAndEditForm = ( - + @@ -620,10 +620,10 @@ const Group = () => { - + ) @@ -634,7 +634,7 @@ const Group = () => { {toolbar} @@ -644,7 +644,6 @@ const Group = () => { { {toolbar} diff --git a/src/pages/System/Role.tsx b/src/pages/System/Role.tsx index a0be4af..4d6b2fd 100644 --- a/src/pages/System/Role.tsx +++ b/src/pages/System/Role.tsx @@ -603,7 +603,7 @@ const Role = () => { ) const addAndEditForm = ( - + @@ -627,10 +627,10 @@ const Role = () => { - + ) @@ -641,7 +641,7 @@ const Role = () => { {toolbar} @@ -651,7 +651,6 @@ const Role = () => { { return ( <> - + diff --git a/src/pages/System/Statistics/index.tsx b/src/pages/System/Statistics/index.tsx index 853b0a8..1fa79ba 100644 --- a/src/pages/System/Statistics/index.tsx +++ b/src/pages/System/Statistics/index.tsx @@ -45,7 +45,7 @@ const Statistics = () => { return ( <> - + diff --git a/src/pages/System/User.tsx b/src/pages/System/User.tsx index 9944054..076c758 100644 --- a/src/pages/System/User.tsx +++ b/src/pages/System/User.tsx @@ -758,12 +758,7 @@ const User = () => { ]) const addAndEditForm = ( - +
{ }))} /> - - + + - - + + { style={{ width: '100%' }} /> - - + + )} @@ -1012,7 +997,7 @@ const User = () => { {toolbar} @@ -1022,7 +1007,6 @@ const User = () => { { return ( <> - +