diff --git a/src/pages/editor/Container.tsx b/src/pages/editor/Container.tsx index be1eebf..6e91bf0 100644 --- a/src/pages/editor/Container.tsx +++ b/src/pages/editor/Container.tsx @@ -23,12 +23,13 @@ import { ActionCreators } from 'redux-undo'; import { StateWithHistory } from 'redux-undo'; import styles from './index.less'; import { useGetBall } from 'react-draggable-ball'; +import { useAnimation } from '@/utils/tool'; const { TabPane } = Tabs; const Container = (props: { history?: any; location?: any; pstate?: any; dispatch?: any }) => { const [scaleNum, setScale] = useState(1); - const [collapsed, setCollapsed] = useState(false); + const [collapsed, setCollapsed] = useState(true); const { pstate, dispatch } = props; const pointData = pstate ? pstate.pointData : {}; @@ -41,6 +42,7 @@ const Container = (props: { history?: any; location?: any; pstate?: any; dispatc }; const toggleCollapsed = (checked: boolean) => { + console.log(checked); setCollapsed(checked); }; @@ -120,6 +122,8 @@ const Container = (props: { history?: any; location?: any; pstate?: any; dispatc intervalDelay: 5, }); + const [display] = useAnimation(collapsed, 500); + return (