diff --git a/README.md b/README.md index 58beeaccd87e230076cab531b8f418f40b6d1aeb..e9eb70799d697a6d5678b3b5497b905304686459 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,91 @@ -# Getting Started with Create React App +# React19 + js + ant-design + react-markdown 实现通用 AI 对话组件 -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). +这是一个基于 React19、JavaScript、Ant Design 和 React Markdown 构建的通用 AI 对话组件项目。该项目旨在提供一个可扩展、可定制的 AI 对话界面,适用于各种应用场景。 -## Available Scripts +## 软件架构 -In the project directory, you can run: +本项目采用模块化设计,主要由以下几个部分组成: -### `npm start` +- **React19**: 用于构建用户界面的 JavaScript 库。 +- **Ant Design**: 提供企业级 UI 设计语言和组件库。 +- **React Markdown**: 用于渲染 Markdown 格式的文本内容。 +- **组件化结构**: 包括对话组件、卡片组件、图表组件、布局组件等,便于复用和扩展。 -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. +## 安装说明 -The page will reload when you make changes.\ -You may also see any lint errors in the console. +1. 确保你已经安装了 Node.js 和 npm。 +2. 克隆项目到本地: + ```bash + git clone https://gitee.com/sunflowey/react.git + ``` +3. 进入项目目录并安装依赖: + ```bash + cd react + npm install + ``` -### `npm test` +## 使用说明 -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. +- **启动开发服务器**: + ```bash + npm start + ``` + 应用将在 `http://localhost:3000` 上运行。 -### `npm run build` +- **运行测试**: + ```bash + npm test + ``` -Builds the app for production to the `build` folder.\ -It correctly bundles React in production mode and optimizes the build for the best performance. +- **构建生产环境版本**: + ```bash + npm run build + ``` -The build is minified and the filenames include the hashes.\ -Your app is ready to be deployed! +- **自定义配置(可选)**: + 如果你需要自定义构建工具和配置,可以使用: + ```bash + npm run eject + ``` -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. +## 主要功能模块 -### `npm run eject` +- **AI 对话组件**: 提供一个交互式的 AI 对话界面,支持 Markdown 渲染。 +- **卡片组件**: 用于展示数据和信息的卡片式布局。 +- **图表组件**: 支持柱状图、饼图、堆叠折线图等多种数据可视化形式。 +- **布局组件**: 提供基本的页面布局结构,包括头部、侧边栏、内容区域等。 +- **数据管理与可视化**: 提供数据管理和可视化展示的功能。 -**Note: this is a one-way operation. Once you `eject`, you can't go back!** +## 贡献指南 -If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. +欢迎贡献代码和提出建议!请遵循以下步骤: -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. +1. Fork 项目。 +2. 创建新分支 (`git checkout -b feature/new-feature`)。 +3. 提交更改 (`git commit -am 'Add some feature'`)。 +4. 推送分支 (`git push origin feature/new-feature`)。 +5. 创建 Pull Request。 -You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. +## Gitee 特性 -## Learn More +- 项目托管在 Gitee 上,支持 Git 版本控制。 +- 支持在线查看代码、提交 Issue 和 Pull Request。 +- 提供项目文档和示例代码,便于快速上手。 -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). +## 学习资源 -To learn React, check out the [React documentation](https://reactjs.org/). +- [Create React App 文档](https://facebook.github.io/create-react-app/docs/getting-started) +- [React 官方文档](https://reactjs.org/) +- [Ant Design 文档](https://ant.design/docs/react/introduce) -### Code Splitting +## 部署 -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) +构建完成后,你可以将 `build` 文件夹中的内容部署到任何静态服务器上。有关详细信息,请参阅 [Create React App 部署文档](https://facebook.github.io/create-react-app/docs/deployment)。 -### Analyzing the Bundle Size +## 常见问题 -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) +- **构建失败**: 如果 `npm run build` 报错无法压缩代码,请参考 [相关解决方案](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)。 -### Making a Progressive Web App +--- -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) - -### Advanced Configuration - -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `npm run build` fails to minify - -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) +该项目提供了一个灵活且强大的基础框架,适用于构建各种 AI 对话应用。欢迎加入我们,共同完善这个项目! \ No newline at end of file