From 95114f63833fc3b2959298a17ff2014769a77886 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 1 Apr 2026 09:46:29 +0800 Subject: [PATCH] feat: create QuickActionIcons header component Add quick action icons for header navigation with hover effects. Co-Authored-By: Claude Sonnet 4.6 --- .../components/layout/QuickActionIcons.tsx | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/common/components/layout/QuickActionIcons.tsx diff --git a/src/common/components/layout/QuickActionIcons.tsx b/src/common/components/layout/QuickActionIcons.tsx new file mode 100644 index 0000000..c8c08bc --- /dev/null +++ b/src/common/components/layout/QuickActionIcons.tsx @@ -0,0 +1,62 @@ +import React from 'react'; +import { Space, Tooltip } from 'antd'; +import { + BuildingOutlined, + ImportOutlined, + TeamOutlined, +} from '@ant-design/icons'; +import { useNavigate } from 'umi'; + +const QuickActionIcons: React.FC = () => { + const navigate = useNavigate(); + + const quickActions = [ + { + icon: , + title: '添加机构', + path: '/company/list', + }, + { + icon: , + title: '导入项目', + path: '/asset/list', + }, + { + icon: , + title: '导入员工', + path: '/company/employees', + }, + ]; + + return ( + + {quickActions.map((action) => ( + +
navigate(action.path)} + style={{ + fontSize: 20, + color: '#262626', + cursor: 'pointer', + padding: '4px 8px', + borderRadius: 4, + transition: 'all 0.3s ease', + }} + onMouseEnter={(e) => { + e.currentTarget.style.color = '#1890ff'; + e.currentTarget.style.backgroundColor = 'rgba(24, 144, 255, 0.1)'; + }} + onMouseLeave={(e) => { + e.currentTarget.style.color = '#262626'; + e.currentTarget.style.backgroundColor = 'transparent'; + }} + > + {action.icon} +
+
+ ))} +
+ ); +}; + +export default QuickActionIcons;