From 890ff1d89f74ca81f16511c0e14a9524492a553a Mon Sep 17 00:00:00 2001 From: VirtualTests1 Date: Sat, 18 Apr 2026 13:19:22 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=AC=A2?= =?UTF-8?q?=E8=BF=8E=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 + src/pages/index.tsx | 228 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 223 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index e988efe..ae781fe 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,5 @@ tsconfig.tsbuildinfo # AI .clinerules + +.pnpm-store \ No newline at end of file diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 3f6b5c4..b2ad8d4 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -4,17 +4,231 @@ * } */ -import { Navigate } from 'react-router-dom'; +import { Button, Card, Col, Divider, Row, Space, Tag, Typography } from 'antd'; +import AppLogo from '@/components/AppLogo'; import { globalConfig } from '@/config'; +import { getIsLogin } from '@/stores/modules'; + +const { Title, Text, Paragraph } = Typography; + +const techStacks = [ + { name: 'React', version: '19', color: '#61dafb' }, + { name: 'TypeScript', version: '5.7', color: '#3178c6' }, + { name: 'Vite', version: '7.0', color: '#646cff' }, + { name: 'Ant Design', version: '5.26', color: '#1890ff' }, + { name: 'React Router', version: '7.7', color: '#ca4245' }, + { name: 'Redux Toolkit', version: '2.8', color: '#764abc' }, + { name: 'UnoCSS', version: '66.3', color: '#333333' }, + { name: 'ECharts', version: '5.6', color: '#e43961' } +]; + +const features = [ + { + title: '现代化技术栈', + description: 'React 19 + TypeScript + Vite + Ant Design,采用最新的前端技术和最佳实践' + }, + { + title: '优雅的 UI 设计', + description: '基于 Ant Design 5.x,支持暗色模式,提供清新优雅的视觉体验' + }, + { + title: '约定式路由', + description: '基于文件系统的自动路由生成,简单直观,易于维护' + }, + { + title: '响应式布局', + description: '完美适配桌面端和移动端,提供一致的用户体验' + }, + { + title: '国际化支持', + description: '内置中英文语言切换,轻松扩展多语言支持' + }, + { + title: '权限管理', + description: '完整的路由权限和菜单权限控制,灵活满足各种业务场景' + }, + { + title: '数据可视化', + description: '集成 ECharts 图表库,提供丰富的数据展示能力' + }, + { + title: '高性能', + description: '基于 Vite 的快速构建和热更新,提升开发体验' + }, + { + title: '主题定制', + description: '支持主题色和布局模式自定义,打造专属的管理系统' + } +]; + +const WelcomePage = () => { + const isLogin = useAppSelector(getIsLogin); + const navigate = useNavigate(); + + const handleEnter = () => { + if (isLogin) { + navigate(globalConfig.homePath); + } else { + navigate('/login'); + } + }; + + const handleViewDocs = () => { + window.open('https://admin-docs.chiko.store', '_blank'); + }; -const Index = () => { return ( - +
+
+
+
+ + + ChikoAdmin + +
+ + 一个基于 React 19、Vite、TypeScript、Ant Design 和 UnoCSS 的清新优雅的中后台模版 + +
+ +
+ + +
+ + + + 项目简介 + + + ChikoAdmin 是一个现代化的中后台管理系统模板,采用最新的技术栈和最佳实践构建。项目使用 Monorepo 架构, + 提供了完整的开发工具链和丰富的功能组件。采用 MSW (Mock Service Worker) 提供强大的 Mock 数据方案, + 让前端开发不再依赖后端接口。 + + + + + + 技术栈 + + + {techStacks.map(tech => ( + + {tech.name} + {tech.version} + + ))} + + + + + + 主要特性 + + + {features.map((feature, index) => ( + + + + {feature.title} + + + {feature.description} + + + + ))} + + + + + + 环境要求 + + + +
+
+ 📦 +
+
+ + Node.js + + >= 18.0.0 +
+
+ + +
+
+ 🚀 +
+
+ + pnpm + + >= 8.0.0 +
+
+ +
+
+ + + +
+ + + 如果 ChikoAdmin 对您有帮助,请给我一个 ⭐️ 支持! + + + + + + + + + 基于 MIT 许可证开源 + +
+
+
); }; -export default Index; +export default WelcomePage; From a6eaeffb5ad1d51c444cdd2f5332dc4814ca576b Mon Sep 17 00:00:00 2001 From: VirtualTests1 Date: Sat, 18 Apr 2026 13:47:57 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor(=E9=A6=96=E9=A1=B5=E7=BB=84?= =?UTF-8?q?=E4=BB=B6):=20=E8=BF=81=E7=A7=BBAntd=E7=BB=84=E4=BB=B6=E5=88=B0?= =?UTF-8?q?=E6=8C=89=E9=9C=80=E5=BC=95=E5=85=A5=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将首页中直接导入的Antd组件改为按需引入方式,使用A前缀命名 移除未使用的Typography组件解构,优化组件导入结构 --- src/pages/index.tsx | 173 ++++++++++++++++++++++---------------------- 1 file changed, 86 insertions(+), 87 deletions(-) diff --git a/src/pages/index.tsx b/src/pages/index.tsx index b2ad8d4..99e9c96 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -4,14 +4,10 @@ * } */ -import { Button, Card, Col, Divider, Row, Space, Tag, Typography } from 'antd'; - import AppLogo from '@/components/AppLogo'; import { globalConfig } from '@/config'; import { getIsLogin } from '@/stores/modules'; -const { Title, Text, Paragraph } = Typography; - const techStacks = [ { name: 'React', version: '19', color: '#61dafb' }, { name: 'TypeScript', version: '5.7', color: '#3178c6' }, @@ -79,58 +75,61 @@ const WelcomePage = () => { }; return ( -
-
-
-
- - + <div className="min-h-screen from-blue-50 via-white to-purple-50 bg-gradient-to-br dark:from-gray-900 dark:via-gray-800 dark:to-gray-900"> + <div className="mx-auto max-w-7xl px-4 py-8 lg:px-8 sm:px-6"> + <header className="mb-12 text-center"> + <div className="mb-6 flex items-center justify-center gap-4"> + <AppLogo className="h-16 w-16" /> + <ATypography.Title + level={1} + className="from-blue-600 to-purple-600 bg-gradient-to-r bg-clip-text text-transparent font-bold !mb-0 !text-4xl" + > ChikoAdmin - +
- + 一个基于 React 19、Vite、TypeScript、Ant Design 和 UnoCSS 的清新优雅的中后台模版 - +
-
- - +
- - + <ACard className="mb-8 shadow-lg" bordered={false}> + <ATypography.Title level={3} className="!mb-4"> 项目简介 - - + + ChikoAdmin 是一个现代化的中后台管理系统模板,采用最新的技术栈和最佳实践构建。项目使用 Monorepo 架构, 提供了完整的开发工具链和丰富的功能组件。采用 MSW (Mock Service Worker) 提供强大的 Mock 数据方案, 让前端开发不再依赖后端接口。 - - + + - - + <ACard className="mb-8 shadow-lg" bordered={false}> + <ATypography.Title level={3} className="!mb-6"> 技术栈 - - + + {techStacks.map(tech => ( - { > {tech.name} {tech.version} - + ))} - - + + - - + <ACard className="mb-8 shadow-lg" bordered={false}> + <ATypography.Title level={3} className="!mb-6"> 主要特性 - - + + {features.map((feature, index) => ( - - + - + <ATypography.Title level={5} className="!mb-2"> {feature.title} - - + + {feature.description} - - - + + + ))} - - + + - - + <ACard className="mb-8 shadow-lg" bordered={false}> + <ATypography.Title level={3} className="!mb-6"> 环境要求 - - - -
-
+ + + +
+
📦
- + Node.js - - >= 18.0.0 + + {'>= 18.0.0'}
- - -
-
+ + +
+
🚀
- + pnpm - - >= 8.0.0 + + {'>= 8.0.0'}
- - - +
+ + - +