-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5aab392
commit a0aa1c7
Showing
230 changed files
with
53,221 additions
and
845 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VITE_TOKEN=this is token | ||
VITE_BASE_URL=/api/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
.DS_Store | ||
dist | ||
dist-ssr | ||
*.local |
5 changes: 5 additions & 0 deletions
5
vite-helloworld/react-vite-admin-tryout/.vscode/settings.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"i18n-ally.localesPaths": [ | ||
"src/locales" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 ychengcloud | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# React + Recoil + React Query + React Hooks + Typescript + Axios + Vite - Starter | ||
|
||
This Starter utilizes React, Recoil, React Query, React Hooks, Typescript, Axios And Vite. | ||
|
||
## [中文文档](./README_ZH.md) | ||
|
||
|
||
## Screenshot | ||
|
||
![](./screenshot1.png) | ||
![](./screenshot2.png) | ||
|
||
|
||
## Installation | ||
|
||
Clone this repo and install all dependencies | ||
|
||
``` | ||
git clone https://github.com/ychengcloud/react-vite-admin.git | ||
cd react-vite-admin | ||
yarn install | ||
``` | ||
|
||
## Development | ||
|
||
``` | ||
yarn dev | ||
``` | ||
|
||
## Build | ||
|
||
``` | ||
yarn build | ||
``` | ||
|
||
## Publish | ||
|
||
``` | ||
yarn dist | ||
``` | ||
|
||
## Contributing | ||
|
||
Your contributions are always welcome! [Click Here to read the guidelines](./contributing.md). | ||
|
||
## Thanks | ||
|
||
- [Antd Design](https://ant.design) | ||
- [Antd Design Pro](https://pro.ant.design/) | ||
- [Vite](https://vitejs.dev/) | ||
- [React Query](https://react-query.tanstack.com/) | ||
- [React antd admin](https://github.com/WinmezzZ/react-antd-admin.git) | ||
- [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) | ||
|
||
## License | ||
|
||
[MIT](./LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# 全新技术栈管理系统 | ||
|
||
全新技术栈的后台管理系统 | ||
|
||
- React | ||
- Recoil | ||
- React Query | ||
- React Hooks | ||
- Vite | ||
- Typescript | ||
|
||
## [Document](./README.md) | ||
|
||
|
||
## 截图 | ||
|
||
![](./screenshot1.png) | ||
![](./screenshot2.png) | ||
|
||
|
||
## 安装使用 | ||
|
||
- 获取项目代码 | ||
|
||
``` | ||
git clone https://github.com/ychengcloud/react-vite-admin.git | ||
``` | ||
|
||
- 安装依赖 | ||
|
||
``` | ||
cd react-vite-admin | ||
``` | ||
|
||
``` | ||
yarn install | ||
``` | ||
|
||
- 运行 | ||
|
||
``` | ||
yarn dev | ||
``` | ||
|
||
- 打包 | ||
|
||
``` | ||
yarn build | ||
``` | ||
|
||
## 如何贡献 | ||
|
||
非常欢迎你的加入!提一个 Issue 或者提交一个 Pull Request。[查看如何操作](./contributing.md). | ||
|
||
## 致谢 | ||
|
||
本项目的产生离不开下列优秀项目给予的灵感和代码 | ||
|
||
- [Antd Design](https://ant.design) | ||
- [Antd Design Pro](https://pro.ant.design/) | ||
- [Vite](https://vitejs.dev/) | ||
- [React Query](https://react-query.tanstack.com/) | ||
- [React antd admin](https://github.com/WinmezzZ/react-antd-admin.git) | ||
- [vue-vben-admin](https://github.com/anncwb/vue-vben-admin) | ||
|
||
如有遗漏,欢迎指正和补充。 | ||
|
||
## 声明 | ||
|
||
本项目旨在学习采用最新技术栈实现一个后台管理系统,不建议在生产环境下使用,仅供学习参考之用,本人不负责使用本项目产生的任何问题。 | ||
|
||
## License | ||
|
||
[MIT](./LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Purpose and Goal | ||
|
||
This list is meant to provide a reference to all widgets and resources related to React Vite Admin. | ||
Contribution Guidelines | ||
|
||
Please ensure your pull request adheres to the following guidelines: | ||
|
||
Search previous suggestions for duplicates before making a new one. | ||
Make an individual pull request for each suggestion. | ||
Use the following format: - [Bookmark Title](link): Description. | ||
Titles should be capitalized. | ||
New categories or improvements to the existing categorization are welcome. | ||
Make sure your text editor is set to remove trailing whitespace. | ||
Check your spelling and grammar. | ||
Do send a Pull Request. | ||
|
||
Thank you for your suggestions! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/src/favicon.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite App</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import { MockMethod } from 'vite-plugin-mock'; | ||
|
||
const mockProjects = { | ||
total: 200, | ||
list: [ | ||
{ | ||
id: 1, | ||
name: 'Project1', | ||
description: 'description', | ||
}, | ||
{ | ||
id: 2, | ||
name: 'Project2', | ||
description: 'description', | ||
}, | ||
|
||
] | ||
} | ||
|
||
export default [ | ||
{ | ||
url: '/api/v1/projects', | ||
method: 'get', | ||
response: ({ query }) => { | ||
return mockProjects; | ||
}, | ||
}, | ||
{ | ||
url: '/api/v1/projects', | ||
method: 'post', | ||
response: ({ body }) => { | ||
let project = body; | ||
project.id = 1; | ||
project.id = 1; | ||
if (mockProjects.list.length > 0) { | ||
const max = mockProjects.list.reduce(function (p, v) { | ||
return (p.id > v.id ? p : v); | ||
}); | ||
if (max) { | ||
project.id = max.id + 1; | ||
} | ||
} | ||
|
||
mockProjects.list.push(project); | ||
return project; | ||
}, | ||
}, | ||
{ | ||
url: '/api/v1/projects', | ||
method: 'patch', | ||
response: ({ body }) => { | ||
let project = body; | ||
if (mockProjects.list) { | ||
const index = mockProjects.list.findIndex((item) => { | ||
return item.id === project.id; | ||
|
||
}); | ||
if (index !== -1 && mockProjects.list) { | ||
mockProjects.list[index] = project; | ||
} | ||
} | ||
return project; | ||
}, | ||
}, | ||
{ | ||
url: '/api/v1/projects:batchDelete', | ||
method: 'post', | ||
response: ({ body }) => { | ||
let idList = body.idList; | ||
if (mockProjects.list) { | ||
idList.forEach((id) => { | ||
const index = mockProjects.list.findIndex((item) => { | ||
return item.id === id; | ||
|
||
}); | ||
if (index > -1) { | ||
mockProjects.list.splice(index, 1); | ||
} | ||
}) | ||
} | ||
|
||
return {}; | ||
}, | ||
}, | ||
] as MockMethod[]; |
Oops, something went wrong.