feat: 新增 APP 扫码登录(PC 端二维码轮询),版本 4.8.0
This commit is contained in:
208
README.md
208
README.md
@@ -19,7 +19,7 @@
|
||||
|
||||
[](https://vue.youlai.tech)
|
||||
[](https://app.youlai.tech)
|
||||
[](https://juejin.cn/post/7228990409909108793)
|
||||
[](https://www.youlai.tech/docs/web/)
|
||||
[](https://www.youlai.tech/docs/web/)
|
||||
[](./README.en-US.md)
|
||||
|
||||
@@ -27,20 +27,16 @@
|
||||
|
||||
## 项目简介
|
||||
|
||||
[vue3-element-admin](https://gitcode.com/youlai/vue3-element-admin) 基于 Vue3、Vite、TypeScript 和 Element-Plus 搭建的极简开箱即用企业级后台管理前端模板。 配套 Java 后端 [youlai-boot](https://gitee.com/youlaiorg/youlai-boot)、多租户后端 [youlai-boot-tenant](https://gitee.com/youlaiorg/youlai-boot-tenant) 和 Node 后端 [youlai-nest](https://gitee.com/youlaiorg/youlai-nest) 。 提供开发简版[vue3-element-template](https://gitee.com/youlaiorg/vue3-element-template) 和 JS 版本[vue3-element-admin-js](https://gitee.com/youlaiorg/vue3-element-admin) 供开发者快速开发。
|
||||
[vue3-element-admin](https://gitcode.com/youlai/vue3-element-admin) 基于 Vue3、Vite、TypeScript 和 Element-Plus 搭建的企业级中后台前端模板,配套 Java 后端 [youlai-boot](https://gitee.com/youlaiorg/youlai-boot)、多租户后端 [youlai-boot-tenant](https://gitee.com/youlaiorg/youlai-boot-tenant) 和 Node 后端 [youlai-nest](https://gitee.com/youlaiorg/youlai-nest)。另提供精简版 [vue3-element-template](https://gitee.com/youlaiorg/vue3-element-template)、JS 版 [vue3-element-admin-js](https://gitee.com/youlaiorg/vue3-element-admin-js) 和 Naive UI 版 [vue3-naiveui-admin](https://gitee.com/youlaiorg/vue3-naiveui-admin) 供不同场景选用。
|
||||
|
||||
## 项目特色
|
||||
|
||||
- **简洁易用**:基于 [vue-element-admin](https://gitee.com/panjiachen/vue-element-admin) 升级的 Vue3 版本,无过渡封装 ,易上手。
|
||||
- **数据交互**: 支持 `Mock` 数据和[线上接口文档](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5),并提供配套的 [Java](https://gitee.com/youlaiorg/youlai-boot) 和 [Node](https://gitee.com/youlaiorg/youlai-nest) 后端源码。
|
||||
|
||||
- **系统功能:** 提供用户管理、角色管理、菜单管理、部门管理、字典管理、系统配置、通知公告等功能模块。
|
||||
- **权限管理:** 支持动态路由、按钮权限、角色权限和数据权限等多种权限管理方式。
|
||||
|
||||
- **多租户:** 支持多租户模式与租户隔离。
|
||||
|
||||
- **基础设施:** 提供国际化、多布局、暗黑模式、全屏、水印、接口文档和代码生成器等功能。
|
||||
- **持续更新**:项目持续开源更新,实时更新工具和依赖。
|
||||
- **简洁易用** — 基于 [vue-element-admin](https://gitee.com/panjiachen/vue-element-admin) 升级的 Vue3 版本,无过度封装,易上手
|
||||
- **权限体系** — 动态路由、按钮权限、角色权限和数据权限
|
||||
- **多租户** — 支持多租户模式与租户隔离
|
||||
- **基础设施** — 国际化、多布局、暗黑模式、全屏、水印、接口文档、代码生成器
|
||||
- **数据交互** — 支持 Mock 数据与线上接口文档,配套 Java / Node 后端源码
|
||||
- **持续更新** — 项目持续开源更新,跟进主流技术栈
|
||||
|
||||
## 系统预览
|
||||
|
||||
@@ -72,68 +68,25 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 生态矩阵
|
||||
## 快速开始
|
||||
|
||||
**前端**
|
||||
**环境要求**:Node.js `^20.19.0` 或 `>=22.12.0` · pnpm `>=8.0.0`
|
||||
|
||||
| 项目 | 技术栈 | 说明 |
|
||||
|:-----|:-------|:-----|
|
||||
| [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | Vue 3 + Vite + TS + Element Plus | PC 管理前端(主推) |
|
||||
| [vue3-element-admin-js](https://gitee.com/youlaiorg/vue3-element-admin-js) | Vue 3 + Vite + JS + Element Plus | JavaScript 版本 |
|
||||
| [vue3-element-template](https://gitee.com/youlaiorg/vue3-element-template) | Vue 3 + Vite + TS + Element Plus | 精简模板 |
|
||||
| [youlai-app](https://gitee.com/youlaiorg/youlai-app) | Vue 3 + UniApp | 移动端 App |
|
||||
|
||||
**后端**
|
||||
|
||||
| 项目 | 技术栈 | 说明 |
|
||||
|:-----|:-------|:-----|
|
||||
| [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | Spring Boot + MyBatis-Plus | Java(主推) |
|
||||
| [youlai-nest](https://gitee.com/youlaiorg/youlai-nest) | NestJS + TypeORM | Node.js |
|
||||
| [youlai-gin](https://gitee.com/youlaiorg/youlai-gin) | Go + Gorm | Go |
|
||||
| [youlai-django](https://gitee.com/youlaiorg/youlai-django) | Django + DRF | Python |
|
||||
| [youlai-fastapi](https://gitee.com/youlaiorg/youlai-fastapi) | FastAPI + SQLAlchemy | Python |
|
||||
| [youlai-think](https://gitee.com/youlaiorg/youlai-think) | ThinkPHP + ThinkORM | PHP |
|
||||
| [youlai-aspnet](https://gitee.com/youlaiorg/youlai-aspnet) | ASP.NET Core + EF Core | C# |
|
||||
| [youlai-axum](https://gitee.com/youlaiorg/youlai-axum) | Axum + SeaORM | Rust |
|
||||
|
||||
> **youlai-boot** 还提供以下变种和分支版本:[多租户](https://gitee.com/youlaiorg/youlai-boot-tenant)· [MyBatis-Flex](https://gitee.com/youlaiorg/youlai-boot-flex)· [Spring Boot 3](https://gitee.com/youlaiorg/youlai-boot/tree/spring-boot-3) · [PostgreSQL](https://gitee.com/youlaiorg/youlai-boot/tree/db-pg) · [多模块](https://gitee.com/youlaiorg/youlai-boot/tree/multi-module)
|
||||
>
|
||||
> 八种后端共享同一套 **RESTful API 规范** 和 **数据库结构**,前端可无缝切换。
|
||||
|
||||
## 开发指南
|
||||
|
||||
| 名称 | 地址 |
|
||||
| -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 视频教程 | [https://www.bilibili.com/video/BV1eFUuYyEFj](https://www.bilibili.com/video/BV1eFUuYyEFj) |
|
||||
| 项目搭建 | [基于 Vue3 + Vite + TypeScript + Element-Plus 从0到1搭建后台管理系统](https://blog.csdn.net/u013737132/article/details/130191394) |
|
||||
| 官方文档 | [https://www.youlai.tech/docs/web/](https://www.youlai.tech/docs/web/) |
|
||||
| 代码规范 | [ESLint V9 + Prettier + Stylelint + EditorConfig 约束和统一前端代码规范](https://youlai.blog.csdn.net/article/details/145608723) |
|
||||
| 提交规范 | [Husky + Lint-staged + Commitlint + Commitizen + cz-git 配置 Git 提交规范](https://youlai.blog.csdn.net/article/details/145615236) |
|
||||
| 接口文档 | [https://www.apifox.cn](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5) |
|
||||
|
||||
## 项目启动
|
||||
|
||||
- **环境准备**
|
||||
|
||||
| 环境类型 | 版本要求 | 备注 |
|
||||
| ------------ | ------------------------------------------------------------ | --------------------------------- |
|
||||
| **Node.js** | `^20.19.0` 或 `>=22.12.0` | 推荐使用 LTS 版本(主版本为偶数) |
|
||||
| **包管理器** | `pnpm >= 8.0.0` | 项目使用 pnpm 作为包管理器 |
|
||||
| 环境类型 | 版本要求 | 备注 |
|
||||
| -------- | -------- | ---- |
|
||||
| **Node.js** | `^20.19.0` 或 `>=22.12.0` | 推荐 LTS 版本(主版本为偶数) |
|
||||
| **包管理器** | `pnpm >= 8.0.0` | 项目使用 pnpm 作为包管理器 |
|
||||
| **开发工具** | [Visual Studio Code](https://code.visualstudio.com/Download) | 推荐安装 Vue、TypeScript 相关插件 |
|
||||
|
||||
- **快速开始**
|
||||
|
||||
```bash
|
||||
# 克隆代码
|
||||
git clone https://gitee.com/youlaiorg/vue3-element-admin.git
|
||||
|
||||
# 切换目录
|
||||
cd vue3-element-admin
|
||||
|
||||
# 安装 pnpm
|
||||
# 安装 pnpm(已安装可跳过)
|
||||
npm install pnpm -g
|
||||
|
||||
# 设置镜像源(可忽略)
|
||||
# 设置镜像源(可忽略)
|
||||
pnpm config set registry https://registry.npmmirror.com
|
||||
|
||||
# 安装依赖
|
||||
@@ -143,6 +96,10 @@ pnpm install
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
启动后访问 [http://localhost:3000](http://localhost:3000),使用 `admin` / `123456` 登录。
|
||||
|
||||
> 更多内容详见官方文档:[快速开始](https://www.youlai.tech/docs/web/) · [部署指南](https://www.youlai.tech/docs/web/deployment/deploy.html)
|
||||
|
||||
## AI 编程
|
||||
|
||||
本项目配套 [Agent Skill](https://skills.sh/youlaitech/youlai-skills),安装后 AI 编程助手会自动遵循本项目的 Vue3 开发规范(命名、目录结构、BEM + UnoCSS、组件与 API 约定)。支持 CodeBuddy、Claude Code、Cursor、Codex、GitHub Copilot 等 70+ Agent。
|
||||
@@ -151,74 +108,75 @@ pnpm run dev
|
||||
npx skills add https://github.com/youlaitech/youlai-skills --skill vue
|
||||
```
|
||||
|
||||
- **安装位置**:项目级默认写入各 Agent 的 skills 目录,如 CodeBuddy → `.codebuddy/skills/vue/SKILL.md`、Claude Code → `.claude/skills/vue/SKILL.md`、Cursor → `.cursor/skills/vue/SKILL.md`;加 `-g` 改为全局 `~/.codebuddy/skills/` 等,跨项目复用。
|
||||
- **生成文件**:`vue/` 目录,内含 `SKILL.md`(frontmatter `name`/`description` + Vue3 开发规范正文)。
|
||||
## 生态矩阵
|
||||
|
||||
**前端**
|
||||
|
||||
| 项目 | 技术栈 | 说明 | 更新状态 |
|
||||
|:-----|:-------|:-----|:---------|
|
||||
| [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | Vue 3 + Vite + TS + Element Plus | PC 管理前端(主推) | ✅️ |
|
||||
| [vue3-element-admin-js](https://gitee.com/youlaiorg/vue3-element-admin-js) | Vue 3 + Vite + JS + Element Plus | JavaScript 版本 | ✅️ |
|
||||
| [vue3-element-template](https://gitee.com/youlaiorg/vue3-element-template) | Vue 3 + Vite + TS + Element Plus | 精简模板 | ✅️ |
|
||||
| [vue3-naiveui-admin](https://gitee.com/youlaiorg/vue3-naiveui-admin) | Vue 3 + Vite + TS + Naive UI | Naive UI 版本 | ✅️ |
|
||||
| [youlai-app](https://gitee.com/youlaiorg/youlai-app) | Vue 3 + UniApp | 移动端 App | ✅️ |
|
||||
|
||||
**后端**
|
||||
|
||||
| 项目 | 技术栈 | 说明 | 更新状态 |
|
||||
|:-----|:-------|:-----|:---------|
|
||||
| [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | Spring Boot + MyBatis-Plus | Java(主推) | ✅️ |
|
||||
| [youlai-nest](https://gitee.com/youlaiorg/youlai-nest) | NestJS + TypeORM | Node.js | ✅️ |
|
||||
| [youlai-gin](https://gitee.com/youlaiorg/youlai-gin) | Go + Gorm | Go | ✅️ |
|
||||
| [youlai-django](https://gitee.com/youlaiorg/youlai-django) | Django + DRF | Python | ✅️ |
|
||||
| [youlai-fastapi](https://gitee.com/youlaiorg/youlai-fastapi) | FastAPI + SQLAlchemy | Python | ✅️ |
|
||||
| [youlai-laravel](https://gitee.com/youlaiorg/youlai-laravel) | Laravel + Eloquent | PHP | ✅️ |
|
||||
| [youlai-think](https://gitee.com/youlaiorg/youlai-think) | ThinkPHP + ThinkORM | PHP | ✅️ |
|
||||
| [youlai-aspnet](https://gitee.com/youlaiorg/youlai-aspnet) | ASP.NET Core + EF Core | C# | ✅️ |
|
||||
| [youlai-axum](https://gitee.com/youlaiorg/youlai-axum) | Axum + SeaORM | Rust | ✅️ |
|
||||
|
||||
> 九种后端共享同一套 **RESTful API 规范** 和 **数据库结构**,前端可无缝切换。
|
||||
|
||||
**变种与衍生版本**
|
||||
|
||||
| 项目 | 基础 | 说明 | 更新状态 |
|
||||
|:-----|:-----|:-----|:---------|
|
||||
| [youlai-boot-tenant](https://gitee.com/youlaiorg/youlai-boot-tenant) | youlai-boot | 多租户 SaaS,租户隔离与租户配置 | ✅️ |
|
||||
| [youlai-boot-flex](https://gitee.com/youlaiorg/youlai-boot-flex) | youlai-boot | 改用 MyBatis-Flex | ✅️ |
|
||||
| [youlai-boot (db-pg)](https://gitee.com/youlaiorg/youlai-boot/tree/db-pg) | youlai-boot | PostgreSQL 数据库分支 | ✅️ |
|
||||
| [youlai-boot (multi-module)](https://gitee.com/youlaiorg/youlai-boot/tree/multi-module) | youlai-boot | 多模块工程拆分 | ✅️ |
|
||||
| [youlai-boot (spring-boot-3)](https://gitee.com/youlaiorg/youlai-boot/tree/spring-boot-3) | youlai-boot | Spring Boot 3 兼容分支 | ✅️ |
|
||||
| [youlai-nest (multi-tenant)](https://gitee.com/youlaiorg/youlai-nest/tree/multi-tenant) | youlai-nest | 多租户 SaaS,租户隔离与租户配置 | ✅️ |
|
||||
|
||||
## 开发指南
|
||||
|
||||
| 名称 | 地址 |
|
||||
| -------- | -------- |
|
||||
| 视频教程 | [https://www.bilibili.com/video/BV1eFUuYyEFj](https://www.bilibili.com/video/BV1eFUuYyEFj) |
|
||||
| 项目搭建 | [基于 Vue3 + Vite + TypeScript + Element-Plus 从0到1搭建后台管理系统](https://blog.csdn.net/u013737132/article/details/130191394) |
|
||||
| 官方文档 | [https://www.youlai.tech/docs/web/](https://www.youlai.tech/docs/web/) |
|
||||
| 部署指南 | [https://www.youlai.tech/docs/web/deployment/deploy.html](https://www.youlai.tech/docs/web/deployment/deploy.html) |
|
||||
| 常见问题 | [https://www.youlai.tech/docs/faq/](https://www.youlai.tech/docs/faq/) |
|
||||
| 代码规范 | [ESLint V9 + Prettier + Stylelint + EditorConfig 约束和统一前端代码规范](https://youlai.blog.csdn.net/article/details/145608723) |
|
||||
| 提交规范 | [Husky + Lint-staged + Commitlint + Commitizen + cz-git 配置 Git 提交规范](https://youlai.blog.csdn.net/article/details/145615236) |
|
||||
| 接口文档 | [https://www.apifox.cn](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5) |
|
||||
|
||||
## 项目部署
|
||||
|
||||
执行 `pnpm run build` 命令后,项目将被打包并生成 `dist` 目录。接下来,将 `dist` 目录下的文件上传到服务器 `/usr/share/nginx/html` 目录下,并配置 Nginx 进行反向代理。
|
||||
执行 `pnpm run build` 打包生成 `dist` 目录,上传至服务器并配置 Nginx 反向代理。
|
||||
|
||||
```bash
|
||||
pnpm run build
|
||||
```
|
||||
|
||||
以下是 Nginx 的配置示例:
|
||||
详细部署流程(Nginx 配置、反向代理、HTTPS 等)见 [部署指南](https://www.youlai.tech/docs/web/deployment/deploy.html)。
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
## 数据接口
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
前端默认使用线上接口,也可切换为本地 Mock 或对接本地后端。
|
||||
|
||||
# 反向代理配置
|
||||
location /prod-api/ {
|
||||
# 请将 api.youlai.tech 替换为您的后端 API 地址,并注意保留后面的斜杠 /
|
||||
proxy_pass http://api.youlai.tech/;
|
||||
}
|
||||
}
|
||||
```
|
||||
**本地 Mock**:将 `.env.development` 的 `VITE_MOCK_DEV_SERVER` 设为 `true` 即启用本地 Mock 接口,无需后端即可独立开发。
|
||||
|
||||
更多详细信息,请参考这篇文章:[Nginx 安装和配置](https://blog.csdn.net/u013737132/article/details/145667694)。
|
||||
|
||||
## 本地Mock
|
||||
|
||||
项目同时支持在线和本地 Mock 接口,默认使用线上接口,如需替换为 Mock 接口,修改文件 `.env.development` 的 `VITE_MOCK_DEV_SERVER` 为 `true` **即可**。
|
||||
|
||||
## 后端接口
|
||||
|
||||
> 如果您具备Java开发基础,按照以下步骤将在线接口转为本地后端接口,创建企业级前后端分离开发环境,助您走向全栈之路。
|
||||
|
||||
1. 获取基于 `Java` 和 `SpringBoot` 开发的后端 [youlai-boot](https://gitee.com/youlaiorg/youlai-boot.git) 源码。
|
||||
2. 根据后端工程的说明文档 [README.md](https://gitee.com/youlaiorg/youlai-boot#%E9%A1%B9%E7%9B%AE%E8%BF%90%E8%A1%8C) 完成本地启动。
|
||||
3. 修改 `.env.development` 文件中的 `VITE_APP_API_URL` 的值,将其从 https://api.youlai.tech 更改为 http://localhost:8000 即可。
|
||||
|
||||
## 注意事项
|
||||
|
||||
- **自动导入插件自动生成默认关闭**
|
||||
|
||||
模板项目的组件类型声明已自动生成。如果添加和使用新的组件,请按照图示方法开启自动生成。在自动生成完成后,记得将其设置为 `false`,避免重复执行引发冲突。
|
||||
|
||||

|
||||
|
||||
- **项目启动浏览器访问空白**
|
||||
|
||||
请升级浏览器尝试,低版本浏览器内核可能不支持某些新的 JavaScript 语法,比如可选链操作符 `?.`。
|
||||
|
||||
- **项目同步仓库更新升级**
|
||||
|
||||
项目同步仓库更新升级之后,建议 `pnpm install` 安装更新依赖之后启动 。
|
||||
|
||||
- **项目组件、函数和引用爆红**
|
||||
|
||||
重启 VSCode 尝试
|
||||
|
||||
- **其他问题**
|
||||
|
||||
如果有其他问题或者建议,建议 [ISSUE](https://gitee.com/youlaiorg/vue3-element-admin/issues/new)
|
||||
**对接后端**:九种后端默认端口均为 `8000`,将 `.env.development` 的 `VITE_APP_API_URL` 改为 `http://localhost:8000` 并启动对应后端即可(主推 Java 后端 [youlai-boot](https://gitee.com/youlaiorg/youlai-boot.git),其余见各自仓库 README)。
|
||||
|
||||
## 提交规范
|
||||
|
||||
@@ -226,16 +184,9 @@ server {
|
||||
|
||||

|
||||
|
||||
## 项目统计
|
||||
## 技术合作
|
||||
|
||||

|
||||
|
||||
Thanks to all the contributors!
|
||||
感谢所有的贡献者!
|
||||
|
||||
[](https://github.com/youlaitech/vue3-element-admin/graphs/contributors)
|
||||
|
||||
---
|
||||
本项目采用 [MIT](LICENSE) 协议开源,可免费商用。欢迎在 [Issue](https://gitee.com/youlaiorg/vue3-element-admin/issues) 提交问题或反馈,也欢迎提交 [Pull Request](https://gitee.com/youlaiorg/vue3-element-admin/pulls) 共建。如需技术支持、商务合作、二次开发或项目定制,可联系作者微信(见下方二维码)。
|
||||
|
||||
<table align="center">
|
||||
<tr>
|
||||
@@ -257,3 +208,4 @@ Thanks to all the contributors!
|
||||
</table>
|
||||
|
||||
<p align="center"><em>技术交流 · 问题反馈 · 商务合作</em></p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user