From bd85dff23427f9c964734758d129cd597d641b4e Mon Sep 17 00:00:00 2001 From: Jerry Date: Thu, 12 Jun 2025 13:56:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/README.md | 7 +++ .../src/components/system/layout/AppShell.jsx | 9 ++-- .../system/layout/FadeInWrapper.jsx | 44 ++++++++++++------- src/frontend/src/pages/Dashboard.jsx | 9 ++-- 4 files changed, 46 insertions(+), 23 deletions(-) diff --git a/src/frontend/README.md b/src/frontend/README.md index fa7e5c4..8964e91 100644 --- a/src/frontend/README.md +++ b/src/frontend/README.md @@ -18,3 +18,10 @@ - 执行`pnpm build`进行`react`服务端构建 - 运行`pnpm start`启动服务端 - 服务运行在本地`3000`端口 + +#### 功能(后端) +- []监控网络流量 +- []扫描环境中的交换机 +- []自然语言解析命令 +- []下发配置到交换机 +- []流量预测 \ No newline at end of file diff --git a/src/frontend/src/components/system/layout/AppShell.jsx b/src/frontend/src/components/system/layout/AppShell.jsx index 3f56f27..cd50313 100644 --- a/src/frontend/src/components/system/layout/AppShell.jsx +++ b/src/frontend/src/components/system/layout/AppShell.jsx @@ -1,7 +1,7 @@ import { Outlet, useLocation } from 'react-router-dom'; -import PageTransition from './PageTransition'; import { Box } from '@chakra-ui/react'; import { AnimatePresence } from 'framer-motion'; +import PageTransition from './PageTransition'; import GithubTransitionCard from '@/components/system/layout/github/GithubTransitionCard'; /** @@ -11,12 +11,11 @@ import GithubTransitionCard from '@/components/system/layout/github/GithubTransi */ const AppShell = () => { const location = useLocation(); - return ( - + - - + + diff --git a/src/frontend/src/components/system/layout/FadeInWrapper.jsx b/src/frontend/src/components/system/layout/FadeInWrapper.jsx index 617931e..a568801 100644 --- a/src/frontend/src/components/system/layout/FadeInWrapper.jsx +++ b/src/frontend/src/components/system/layout/FadeInWrapper.jsx @@ -1,29 +1,43 @@ -import { motion } from 'framer-motion'; +import { AnimatePresence, motion } from 'framer-motion'; /** - * 组件载入动画 + * 组件进入 / 离开时的淡入淡出动画 * @param children 子组件 * @param delay 延迟 * @param yOffset y轴偏移量 * @param duration 动画时间 * @param className 类名 + * @param props * @returns {JSX.Element} * @constructor */ -const FadeInWrapper = ({ children, delay = 0, yOffset = 10, duration = 0.6, className = '' }) => { +const FadeInWrapper = ({ + children, + delay = 0, + yOffset = 10, + duration = 0.6, + className = '', + ...props +}) => { return ( - - {children} - + + + {children} + + ); }; + export default FadeInWrapper; diff --git a/src/frontend/src/pages/Dashboard.jsx b/src/frontend/src/pages/Dashboard.jsx index 80c3282..964dd61 100644 --- a/src/frontend/src/pages/Dashboard.jsx +++ b/src/frontend/src/pages/Dashboard.jsx @@ -3,15 +3,18 @@ import { Box, Text } from '@chakra-ui/react'; import DocumentTitle from '@/components/system/pages/DocumentTitle'; import PageContainer from '@/components/system/PageContainer'; import DashboardBackground from '@/components/system/pages/DashboardBackground'; +import FadeInWrapper from '@/components/system/layout/FadeInWrapper'; const Dashboard = () => { return ( - - 控制台奇怪的功能+1 - + + + 控制台奇怪的功能+1 + + );