@chenhui996/gg-cli 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/index.js +15 -0
  2. package/dist/index.js.map +1 -1
  3. package/dist/template/operations-tem/.env +1 -0
  4. package/dist/template/operations-tem/README.md +146 -0
  5. package/dist/template/operations-tem/eslint.config.js +27 -0
  6. package/dist/template/operations-tem/package-lock.json +4672 -0
  7. package/dist/template/{react-temp2 → operations-tem}/package.json +11 -2
  8. package/dist/template/operations-tem/src/api/user.ts +21 -0
  9. package/dist/template/operations-tem/src/assets/Frame 20.png +0 -0
  10. package/dist/template/operations-tem/src/components/Chart/index.tsx +22 -0
  11. package/dist/template/operations-tem/src/layouts/BasicLayout.tsx +183 -0
  12. package/dist/template/operations-tem/src/main.tsx +38 -0
  13. package/dist/template/operations-tem/src/pages/404.tsx +32 -0
  14. package/dist/template/operations-tem/src/pages/about/index.tsx +8 -0
  15. package/dist/template/operations-tem/src/pages/calendar/index.tsx +8 -0
  16. package/dist/template/operations-tem/src/pages/dashboard/index.tsx +72 -0
  17. package/dist/template/operations-tem/src/pages/home/index.less +59 -0
  18. package/dist/template/operations-tem/src/pages/home/index.tsx +188 -0
  19. package/dist/template/operations-tem/src/pages/settings/index.tsx +8 -0
  20. package/dist/template/operations-tem/src/pages/workspace/index.tsx +8 -0
  21. package/dist/template/operations-tem/src/router/index.tsx +75 -0
  22. package/dist/template/operations-tem/src/store/useCounterStore.ts +24 -0
  23. package/dist/template/operations-tem/src/style.less +3 -0
  24. package/dist/template/operations-tem/src/utils/request/index.ts +108 -0
  25. package/dist/template/{react-temp2 → operations-tem}/vite.config.ts +7 -0
  26. package/dist/template/{react-temp2 → react19}/index.html +1 -1
  27. package/dist/template/{react-temp1 → react19}/src/main.tsx +1 -1
  28. package/package.json +2 -2
  29. package/dist/template/react-temp2/README.md +0 -75
  30. package/dist/template/react-temp2/eslint.config.js +0 -23
  31. package/dist/template/react-temp2/src/App.css +0 -184
  32. package/dist/template/react-temp2/src/App.tsx +0 -121
  33. package/dist/template/react-temp2/src/assets/hero.png +0 -0
  34. package/dist/template/react-temp2/src/assets/vite.svg +0 -1
  35. package/dist/template/react-temp2/src/index.css +0 -111
  36. package/dist/template/react-temp2/src/main.tsx +0 -10
  37. /package/dist/template/{react-temp1 → operations-tem}/index.html +0 -0
  38. /package/dist/template/{react-temp1 → operations-tem}/public/favicon.svg +0 -0
  39. /package/dist/template/{react-temp1 → operations-tem}/public/icons.svg +0 -0
  40. /package/dist/template/{react-temp1 → operations-tem}/src/assets/react.svg +0 -0
  41. /package/dist/template/{react-temp1 → operations-tem}/tsconfig.app.json +0 -0
  42. /package/dist/template/{react-temp1 → operations-tem}/tsconfig.json +0 -0
  43. /package/dist/template/{react-temp1 → operations-tem}/tsconfig.node.json +0 -0
  44. /package/dist/template/{react-temp1 → react19}/README.md +0 -0
  45. /package/dist/template/{react-temp1 → react19}/eslint.config.js +0 -0
  46. /package/dist/template/{react-temp1 → react19}/package.json +0 -0
  47. /package/dist/template/{react-temp2 → react19}/public/favicon.svg +0 -0
  48. /package/dist/template/{react-temp2 → react19}/public/icons.svg +0 -0
  49. /package/dist/template/{react-temp1 → react19}/src/App.css +0 -0
  50. /package/dist/template/{react-temp1 → react19}/src/App.tsx +0 -0
  51. /package/dist/template/{react-temp1 → react19}/src/assets/hero.png +0 -0
  52. /package/dist/template/{react-temp2 → react19}/src/assets/react.svg +0 -0
  53. /package/dist/template/{react-temp1 → react19}/src/assets/vite.svg +0 -0
  54. /package/dist/template/{react-temp1 → react19}/src/index.css +0 -0
  55. /package/dist/template/{react-temp2 → react19}/tsconfig.app.json +0 -0
  56. /package/dist/template/{react-temp2 → react19}/tsconfig.json +0 -0
  57. /package/dist/template/{react-temp2 → react19}/tsconfig.node.json +0 -0
  58. /package/dist/template/{react-temp1 → react19}/vite.config.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "react-temp2",
2
+ "name": "react-temp1",
3
3
  "private": true,
4
4
  "version": "0.0.0",
5
5
  "type": "module",
@@ -10,8 +10,16 @@
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
+ "@ant-design/icons": "^6.1.0",
14
+ "antd": "^6.3.3",
15
+ "axios": "^1.13.6",
16
+ "echarts": "^6.0.0",
17
+ "echarts-for-react": "^3.0.6",
13
18
  "react": "^19.2.4",
14
- "react-dom": "^19.2.4"
19
+ "react-dom": "^19.2.4",
20
+ "react-router-dom": "^7.13.1",
21
+ "tslib": "^2.8.1",
22
+ "zustand": "^5.0.12"
15
23
  },
16
24
  "devDependencies": {
17
25
  "@babel/core": "^7.29.0",
@@ -27,6 +35,7 @@
27
35
  "eslint-plugin-react-hooks": "^7.0.1",
28
36
  "eslint-plugin-react-refresh": "^0.5.2",
29
37
  "globals": "^17.4.0",
38
+ "less": "^4.6.4",
30
39
  "typescript": "~5.9.3",
31
40
  "typescript-eslint": "^8.56.1",
32
41
  "vite": "^8.0.0"
@@ -0,0 +1,21 @@
1
+ import { request } from '../utils/request';
2
+
3
+ // 定义接口返回的数据类型
4
+ export interface UserInfo {
5
+ id: number;
6
+ name: string;
7
+ email: string;
8
+ }
9
+
10
+ // 示例 API 服务
11
+ export const userService = {
12
+ // 获取用户信息
13
+ getUserInfo: (userId: number) => {
14
+ return request.get<UserInfo>(`/users/${userId}`);
15
+ },
16
+
17
+ // 更新用户信息
18
+ updateUserInfo: (userId: number, data: Partial<UserInfo>) => {
19
+ return request.put<UserInfo>(`/users/${userId}`, data);
20
+ }
21
+ };
@@ -0,0 +1,22 @@
1
+ import ReactECharts from 'echarts-for-react';
2
+ import type { EChartsOption } from 'echarts';
3
+
4
+ interface ChartProps {
5
+ option: EChartsOption;
6
+ style?: React.CSSProperties;
7
+ className?: string;
8
+ loading?: boolean;
9
+ }
10
+
11
+ export default function Chart({ option, style, className, loading = false }: ChartProps) {
12
+ return (
13
+ <ReactECharts
14
+ option={option}
15
+ style={{ height: '100%', width: '100%', ...style }}
16
+ className={className}
17
+ showLoading={loading}
18
+ notMerge={true}
19
+ lazyUpdate={true}
20
+ />
21
+ );
22
+ }
@@ -0,0 +1,183 @@
1
+ import { Outlet, Link, useLocation, useNavigate } from "react-router-dom";
2
+ import {
3
+ Layout,
4
+ Menu,
5
+ Avatar,
6
+ Badge,
7
+ Space,
8
+ Typography,
9
+ Button,
10
+ } from "antd";
11
+ import {
12
+ MessageOutlined,
13
+ AppstoreOutlined,
14
+ FolderOutlined,
15
+ CalendarOutlined,
16
+ SettingOutlined,
17
+ BellOutlined,
18
+ UserOutlined,
19
+ } from "@ant-design/icons";
20
+
21
+ const { Header, Content, Sider } = Layout;
22
+ const { Text } = Typography;
23
+
24
+ /**
25
+ * 侧边栏菜单配置
26
+ * 使用数据驱动的方式定义菜单项,方便后续扩展
27
+ * @property {string} key - 路由路径,用于 Link 跳转和菜单高亮
28
+ * @property {ReactNode} icon - 菜单图标组件
29
+ * @property {string} label - 菜单显示名称
30
+ */
31
+ const MENU_ITEMS = [
32
+ {
33
+ key: "/",
34
+ icon: <MessageOutlined />,
35
+ label: "聊天",
36
+ },
37
+ {
38
+ key: "/dashboard",
39
+ icon: <AppstoreOutlined />,
40
+ label: "功能大厅",
41
+ },
42
+ {
43
+ key: "/workspace", // 暂未实现
44
+ icon: <FolderOutlined />,
45
+ label: "工作空间",
46
+ },
47
+ {
48
+ key: "/calendar", // 暂未实现
49
+ icon: <CalendarOutlined />,
50
+ label: "日历",
51
+ },
52
+ ];
53
+
54
+ /**
55
+ * 基础布局组件 (BasicLayout)
56
+ *
57
+ * 整体布局结构:
58
+ * - Sider (左侧侧边栏)
59
+ * - Logo
60
+ * - Menu (动态渲染)
61
+ * - UserProfile (底部固定)
62
+ * - Layout (右侧主体)
63
+ * - Header (顶部导航)
64
+ * - Content (路由出口 Outlet)
65
+ *
66
+ * @returns {JSX.Element} 布局组件
67
+ */
68
+ export default function BasicLayout() {
69
+ // 获取当前路由路径,用于菜单高亮
70
+ const location = useLocation();
71
+ // 路由跳转钩子,用于编程式导航
72
+ const navigate = useNavigate();
73
+
74
+ // 渲染侧边栏底部用户信息区域
75
+ const renderUserProfile = () => (
76
+ <div
77
+ style={{
78
+ padding: "16px",
79
+ display: "flex",
80
+ alignItems: "center",
81
+ justifyContent: "space-between",
82
+ }}
83
+ >
84
+ <Space>
85
+ <Avatar
86
+ src="https://api.dicebear.com/7.x/miniavs/svg?seed=1"
87
+ icon={<UserOutlined />}
88
+ />
89
+ <Text strong style={{ fontSize: 14 }}>
90
+ 国泰海通-张三
91
+ </Text>
92
+ </Space>
93
+ <Button type="text" icon={<SettingOutlined />} onClick={() => navigate('/settings')} />
94
+ </div>
95
+ );
96
+
97
+ return (
98
+ <Layout style={{ minHeight: "100vh", position: "relative" }}>
99
+ {/* 左侧侧边栏 */}
100
+ <Sider
101
+ width={240}
102
+ theme="light"
103
+ style={{
104
+ borderRight: "1px solid #f0f0f0",
105
+ }}
106
+ >
107
+ <div style={{ display: "flex", flexDirection: "column", height: '100%', position: 'relative' }}>
108
+ {/* Logo 区域 */}
109
+ <div
110
+ style={{
111
+ height: 64,
112
+ display: "flex",
113
+ alignItems: "center",
114
+ paddingLeft: 24,
115
+ fontSize: 20,
116
+ fontWeight: "bold",
117
+ color: "#333",
118
+ }}
119
+ >
120
+ PILOTCORE
121
+ </div>
122
+
123
+ {/* 菜单区域 - flex: 1 撑满剩余空间 */}
124
+ <div style={{ flex: 1, overflowY: "auto" }}>
125
+ <Menu
126
+ mode="inline"
127
+ selectedKeys={[location.pathname]}
128
+ style={{ borderRight: 0, paddingBottom: 16, borderBottom: "1px solid #f0f0f0" }}
129
+ items={MENU_ITEMS.map((item) => ({
130
+ ...item,
131
+ label: <Link to={item.key}>{item.label}</Link>,
132
+ }))}
133
+ />
134
+ </div>
135
+
136
+ {/* 底部用户信息 */}
137
+ <div style={{ position: "absolute", bottom: 0, width: '100%' }}>
138
+ {renderUserProfile()}
139
+ </div>
140
+ </div>
141
+ </Sider>
142
+
143
+ {/* 右侧主体区域 */}
144
+ <Layout>
145
+ {/* 顶部导航栏 */}
146
+ <Header
147
+ style={{
148
+ padding: "0 24px",
149
+ display: "flex",
150
+ justifyContent: "flex-end",
151
+ alignItems: "center",
152
+ backgroundColor: "transparent", // 透明背景融入整体
153
+ }}
154
+ >
155
+ <Space size={24}>
156
+ {/* 通知图标 */}
157
+ <Badge count={3} offset={[2, 2]} color="#1677ff">
158
+ <Button
159
+ icon={<BellOutlined />}
160
+ shape="circle"
161
+ style={{
162
+ border: "none",
163
+ background: "#fff",
164
+ boxShadow: "0 2px 8px rgba(0,0,0,0.05)",
165
+ }}
166
+ />
167
+ </Badge>
168
+ </Space>
169
+ </Header>
170
+
171
+ {/* 内容区域 */}
172
+ <Content
173
+ style={{
174
+ margin: "0 24px 24px",
175
+ minHeight: 280,
176
+ }}
177
+ >
178
+ <Outlet />
179
+ </Content>
180
+ </Layout>
181
+ </Layout>
182
+ );
183
+ }
@@ -0,0 +1,38 @@
1
+ import { StrictMode } from 'react'
2
+ import { createRoot } from 'react-dom/client'
3
+ import { RouterProvider } from 'react-router-dom'
4
+ import { ConfigProvider } from 'antd'
5
+ import zhCN from 'antd/locale/zh_CN'
6
+ import { router } from './router'
7
+ import 'antd/dist/reset.css'
8
+ import './style.less'
9
+
10
+ createRoot(document.getElementById('root')!).render(
11
+ <StrictMode>
12
+ <ConfigProvider
13
+ locale={zhCN}
14
+ theme={{
15
+ token: {
16
+ colorPrimary: '#4F46E5', // 调整为更接近设计稿的深蓝色
17
+ borderRadius: 8, // 全局圆角
18
+ colorBgLayout: '#F9FAFB', // 极淡的背景灰
19
+ },
20
+ components: {
21
+ Layout: {
22
+ siderBg: '#ffffff', // 侧边栏白色背景
23
+ headerBg: '#ffffff', // 顶栏白色背景
24
+ },
25
+ Menu: {
26
+ itemSelectedBg: '#EFF6FF', // 选中项浅蓝背景
27
+ itemSelectedColor: '#4F46E5', // 选中项文字颜色
28
+ },
29
+ Card: {
30
+ borderRadiusLG: 12, // 卡片大圆角
31
+ },
32
+ },
33
+ }}
34
+ >
35
+ <RouterProvider router={router} />
36
+ </ConfigProvider>
37
+ </StrictMode>,
38
+ )
@@ -0,0 +1,32 @@
1
+ import { Button, Result } from 'antd';
2
+ import { useNavigate } from 'react-router-dom';
3
+
4
+ /**
5
+ * 404 页面组件
6
+ * 当用户访问不存在的路由时展示
7
+ */
8
+ export default function NotFound() {
9
+ const navigate = useNavigate();
10
+
11
+ return (
12
+ <Result
13
+ status="404"
14
+ title="404"
15
+ subTitle="抱歉,您访问的页面不存在。"
16
+ extra={
17
+ <Button type="primary" onClick={() => navigate('/')}>
18
+ 返回首页
19
+ </Button>
20
+ }
21
+ style={{
22
+ height: '100%',
23
+ display: 'flex',
24
+ flexDirection: 'column',
25
+ justifyContent: 'center',
26
+ background: '#fff',
27
+ borderRadius: 8,
28
+ margin: 24,
29
+ }}
30
+ />
31
+ );
32
+ }
@@ -0,0 +1,8 @@
1
+ export default function About() {
2
+ return (
3
+ <div>
4
+ <h2>About Page</h2>
5
+ <p>This is a modern React template generated by gg-cli.</p>
6
+ </div>
7
+ );
8
+ }
@@ -0,0 +1,8 @@
1
+ export default function Workspace() {
2
+ return (
3
+ <div>
4
+ <h2>Calendar Page</h2>
5
+ <p>This is a modern React template generated by gg-cli.</p>
6
+ </div>
7
+ );
8
+ }
@@ -0,0 +1,72 @@
1
+ import { Card, Row, Col } from 'antd';
2
+ import Chart from '../../components/Chart';
3
+ import type { EChartsOption } from 'echarts';
4
+
5
+ export default function Dashboard() {
6
+ // 柱状图配置
7
+ const barOption: EChartsOption = {
8
+ title: { text: '周访问量' },
9
+ tooltip: { trigger: 'axis' },
10
+ xAxis: {
11
+ type: 'category',
12
+ data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
13
+ },
14
+ yAxis: { type: 'value' },
15
+ series: [
16
+ {
17
+ data: [120, 200, 150, 80, 70, 110, 130],
18
+ type: 'bar',
19
+ itemStyle: { color: '#1677ff' },
20
+ },
21
+ ],
22
+ };
23
+
24
+ // 饼图配置
25
+ const pieOption: EChartsOption = {
26
+ title: { text: '用户来源' },
27
+ tooltip: { trigger: 'item' },
28
+ legend: { top: 'bottom' },
29
+ series: [
30
+ {
31
+ name: 'Access From',
32
+ type: 'pie',
33
+ radius: ['40%', '70%'],
34
+ avoidLabelOverlap: false,
35
+ itemStyle: {
36
+ borderRadius: 10,
37
+ borderColor: '#fff',
38
+ borderWidth: 2,
39
+ },
40
+ label: { show: false, position: 'center' },
41
+ emphasis: {
42
+ label: { show: true, fontSize: 20, fontWeight: 'bold' },
43
+ },
44
+ data: [
45
+ { value: 1048, name: 'Search Engine' },
46
+ { value: 735, name: 'Direct' },
47
+ { value: 580, name: 'Email' },
48
+ { value: 484, name: 'Union Ads' },
49
+ { value: 300, name: 'Video Ads' },
50
+ ],
51
+ },
52
+ ],
53
+ };
54
+
55
+ return (
56
+ <div>
57
+ <h2 style={{ marginBottom: 24 }}>数据看板 (Dashboard)</h2>
58
+ <Row gutter={[24, 24]}>
59
+ <Col xs={24} md={12}>
60
+ <Card styles={{ body: { height: 400, padding: 0 } }}>
61
+ <Chart option={barOption} />
62
+ </Card>
63
+ </Col>
64
+ <Col xs={24} md={12}>
65
+ <Card styles={{ body: { height: 400, padding: 0 } }}>
66
+ <Chart option={pieOption} />
67
+ </Card>
68
+ </Col>
69
+ </Row>
70
+ </div>
71
+ );
72
+ }
@@ -0,0 +1,59 @@
1
+ .home-page {
2
+ padding: 20px 0;
3
+
4
+ .welcome-header {
5
+ text-align: center;
6
+ margin-bottom: 40px;
7
+ margin-top: 40px;
8
+
9
+ h2.ant-typography {
10
+ margin-bottom: 8px;
11
+ }
12
+ }
13
+
14
+ .search-section {
15
+ max-width: 800px;
16
+ margin: 0 auto 48px;
17
+
18
+ .search-box {
19
+ background: #fff;
20
+ border-radius: 12px;
21
+ padding: 8px 8px 8px 16px;
22
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
23
+ border: 1px solid #f0f0f0;
24
+ display: flex;
25
+ align-items: center;
26
+
27
+ .search-icon {
28
+ font-size: 18px;
29
+ color: #999;
30
+ margin-right: 12px;
31
+ }
32
+
33
+ .search-input {
34
+ flex: 1;
35
+ font-size: 14px;
36
+ }
37
+
38
+ .search-btn {
39
+ margin-left: 8px;
40
+ }
41
+ }
42
+
43
+ .search-tags {
44
+ margin-top: 16px;
45
+ display: flex;
46
+ gap: 8px;
47
+ justify-content: flex-start;
48
+ padding-left: 4px;
49
+
50
+ .tag-item {
51
+ border-radius: 16px;
52
+ padding: 4px 12px;
53
+ border: 1px solid #e5e7eb;
54
+ background: #fff;
55
+ cursor: pointer;
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,188 @@
1
+ import { Input, Tag, Card, Row, Col, List, Button, Typography, Space } from 'antd';
2
+ import {
3
+ ArrowUpOutlined,
4
+ AppstoreOutlined,
5
+ SettingOutlined,
6
+ SafetyCertificateOutlined,
7
+ AuditOutlined,
8
+ WalletOutlined,
9
+ DatabaseOutlined,
10
+ PaperClipOutlined,
11
+ } from '@ant-design/icons';
12
+ import './index.less';
13
+
14
+ const { Title, Text } = Typography;
15
+
16
+ // --- Components ---
17
+
18
+ /**
19
+ * 欢迎语组件 (WelcomeHeader)
20
+ * 展示用户个性化问候语和任务概览
21
+ */
22
+ const WelcomeHeader = () => (
23
+ <div className="welcome-header">
24
+ <Title level={2}>
25
+ 下午好,你有3件待办任务...
26
+ </Title>
27
+ </div>
28
+ );
29
+
30
+ /**
31
+ * 搜索区域组件 (SearchSection)
32
+ * 包含搜索框和快捷操作标签 (Tag)
33
+ * 样式位于 ./index.less
34
+ */
35
+ const SearchSection = () => (
36
+ <div className="search-section">
37
+ {/* 搜索输入框 */}
38
+ <div className="search-box">
39
+ <PaperClipOutlined className="search-icon" />
40
+ <Input
41
+ bordered={false}
42
+ placeholder="输入您想查询的数据、指令或功能,例如:帮我分析一下NVDA的最新财报..."
43
+ className="search-input"
44
+ />
45
+ <Button
46
+ type="primary"
47
+ shape="circle"
48
+ icon={<ArrowUpOutlined />}
49
+ className="search-btn"
50
+ />
51
+ </div>
52
+
53
+ {/* 快捷标签 */}
54
+ <div className="search-tags">
55
+ <Tag className="tag-item">
56
+ 分析财报
57
+ </Tag>
58
+ <Tag className="tag-item">
59
+ 查询头寸
60
+ </Tag>
61
+ <Tag className="tag-item">
62
+ 压力测试
63
+ </Tag>
64
+ </div>
65
+ </div>
66
+ );
67
+
68
+ /**
69
+ * 常用功能组件 (QuickActions)
70
+ * 使用 Grid 布局展示应用的核心功能入口
71
+ * 每个卡片包含:图标、标题和背景色
72
+ */
73
+ const QuickActions = () => {
74
+ // 功能入口配置数据
75
+ const actions = [
76
+ { title: '工作空间', icon: <AppstoreOutlined style={{ fontSize: 24, color: '#4F46E5' }} />, color: '#EEF2FF' },
77
+ { title: '规则配置', icon: <SettingOutlined style={{ fontSize: 24, color: '#0EA5E9' }} />, color: '#F0F9FF' },
78
+ { title: '事后风控', icon: <SafetyCertificateOutlined style={{ fontSize: 24, color: '#F59E0B' }} />, color: '#FFFBEB' },
79
+ { title: '交易审批', icon: <AuditOutlined style={{ fontSize: 24, color: '#10B981' }} />, color: '#ECFDF5' },
80
+ { title: '证券池管理', icon: <WalletOutlined style={{ fontSize: 24, color: '#3B82F6' }} />, color: '#EFF6FF' },
81
+ { title: '数据审批', icon: <DatabaseOutlined style={{ fontSize: 24, color: '#06B6D4' }} />, color: '#ECFEFF' },
82
+ ];
83
+
84
+ return (
85
+ <div style={{ maxWidth: 1000, margin: '0 auto 48px' }}>
86
+ <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 16, padding: '0 8px' }}>
87
+ <Text type="secondary">常用功能</Text>
88
+ <Button type="link" size="small" style={{ color: '#999' }}>更多</Button>
89
+ </div>
90
+ <Row gutter={[16, 16]}>
91
+ {actions.map((action) => (
92
+ <Col span={4} key={action.title}>
93
+ <Card
94
+ hoverable
95
+ bordered={false}
96
+ bodyStyle={{
97
+ padding: '24px 12px',
98
+ display: 'flex',
99
+ flexDirection: 'column',
100
+ alignItems: 'center',
101
+ justifyContent: 'center',
102
+ gap: 12,
103
+ }}
104
+ style={{ boxShadow: '0 2px 8px rgba(0,0,0,0.02)' }}
105
+ >
106
+ <div
107
+ style={{
108
+ width: 48,
109
+ height: 48,
110
+ borderRadius: 12,
111
+ background: action.color,
112
+ display: 'flex',
113
+ alignItems: 'center',
114
+ justifyContent: 'center',
115
+ }}
116
+ >
117
+ {action.icon}
118
+ </div>
119
+ <Text style={{ fontSize: 13, fontWeight: 500 }}>{action.title}</Text>
120
+ </Card>
121
+ </Col>
122
+ ))}
123
+ </Row>
124
+ </div>
125
+ );
126
+ };
127
+
128
+ /**
129
+ * 待办任务组件 (TaskList)
130
+ * 展示用户今日待办事项,支持紧急程度标记
131
+ */
132
+ const TaskList = () => {
133
+ // 模拟任务数据
134
+ const tasks = [
135
+ { time: '16:30', content: '确认:交易对手方授信额度调整', tag: '紧急', tagColor: '#EF4444' },
136
+ { time: '17:00', content: '复核:昨日异常交易流水', tag: '', tagColor: '' },
137
+ { time: '17:12', content: '复核:昨日异常交易流水', tag: '', tagColor: '' },
138
+ ];
139
+
140
+ return (
141
+ <div style={{ maxWidth: 1000, margin: '0 auto' }}>
142
+ <Text type="secondary" style={{ marginBottom: 16, display: 'block', paddingLeft: 8 }}>待办任务</Text>
143
+ <List
144
+ dataSource={tasks}
145
+ renderItem={(item) => (
146
+ <List.Item
147
+ style={{
148
+ background: '#fff',
149
+ borderRadius: 12,
150
+ marginBottom: 12,
151
+ padding: '20px 24px',
152
+ border: '1px solid #f0f0f0',
153
+ display: 'flex',
154
+ alignItems: 'center',
155
+ }}
156
+ >
157
+ <div style={{ display: 'flex', alignItems: 'center', flex: 1 }}>
158
+ <Text type="secondary" style={{ width: 60, marginRight: 16 }}>{item.time}</Text>
159
+ <Text style={{ fontSize: 15, fontWeight: 500 }}>{item.content}</Text>
160
+ </div>
161
+
162
+ <Space size={16}>
163
+ {item.tag && (
164
+ <Tag color={item.tagColor} style={{ borderRadius: 4, border: 'none', marginRight: 0 }}>
165
+ {item.tag}
166
+ </Tag>
167
+ )}
168
+ <Button type="link" size="small">处理</Button>
169
+ </Space>
170
+ </List.Item>
171
+ )}
172
+ />
173
+ </div>
174
+ );
175
+ };
176
+
177
+ // --- Main Page ---
178
+
179
+ export default function Home() {
180
+ return (
181
+ <div className="home-page">
182
+ <WelcomeHeader />
183
+ <SearchSection />
184
+ <QuickActions />
185
+ <TaskList />
186
+ </div>
187
+ );
188
+ }
@@ -0,0 +1,8 @@
1
+ export default function Settings() {
2
+ return (
3
+ <div>
4
+ <h2>Settings Page</h2>
5
+ <p>This is a modern React template generated by gg-cli.</p>
6
+ </div>
7
+ );
8
+ }
@@ -0,0 +1,8 @@
1
+ export default function Workspace() {
2
+ return (
3
+ <div>
4
+ <h2>Workspace Page</h2>
5
+ <p>This is a modern React template generated by gg-cli.</p>
6
+ </div>
7
+ );
8
+ }