diff --git a/.stylelintrc.cjs b/.stylelintrc.cjs
index 5eb86831..0e021578 100644
--- a/.stylelintrc.cjs
+++ b/.stylelintrc.cjs
@@ -32,6 +32,7 @@ module.exports = {
},
],
// 允许使用未知伪元素
+ "no-invalid-position-declaration": null, // Vue 模板内联 style 误报
"at-rule-no-unknown": null, // 禁用默认的未知 at-rule 检查
"scss/at-rule-no-unknown": true, // 启用 SCSS 特定的 at-rule 检查
},
diff --git a/README.en-US.md b/README.en-US.md
index bc358e9f..a29b07b4 100644
--- a/README.en-US.md
+++ b/README.en-US.md
@@ -1,35 +1,27 @@
-

-
vue3-element-admin
-

-

-

-

-
-
-
+

-
-
-
-
-
-
-
-
-
+# vue3-element-admin
-
-
-
+**Vue3 + Vite + TypeScript Enterprise Admin Frontend**
+
+[](https://vuejs.org/)
+[](https://vitejs.dev/)
+[](https://element-plus.org/)
+[](https://gitee.com/youlaiorg/vue3-element-admin/stargazers)
+[](https://github.com/youlaitech/vue3-element-admin)
+[](https://gitcode.com/youlai/vue3-element-admin/stargazers)
+[](LICENSE)

## Introduction
@@ -49,31 +41,61 @@
- **Infrastructure**: Provides internationalization, multiple layouts, dark mode, full screen, watermark, API documentation, and code generator functionality.
- **Continuous Updates**: Project is continuously updated with real-time updates of tools and dependencies.
-## Project Screenshots
+## System Preview
-🖥️ **Dashboard**
+**PC**
-
+
+
+  |
+  |
+
+
+  |
+  |
+
+
+  |
+  |
+
+
-⚡**API Documentation**
+**Mobile**
-
+
-📲 **Mobile Version**
+## Ecosystem
-
+**Frontend**
-## Project Source Code
+| Project | Tech Stack | Description |
+|:-----|:-------|:-----|
+| [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | Vue 3 + Vite + TS + Element Plus | PC Admin (Main) |
+| [vue3-element-admin-js](https://gitee.com/youlaiorg/vue3-element-admin-js) | Vue 3 + Vite + JS + Element Plus | JavaScript Version |
+| [vue3-element-template](https://gitee.com/youlaiorg/vue3-element-template) | Vue 3 + Vite + TS + Element Plus | Lite Template |
+| [youlai-app](https://gitee.com/youlaiorg/youlai-app) | Vue 3 + UniApp | Mobile App |
-| Project | Gitee | Github | GitCode |
-| ------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| vue3-element-admin ✅ | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) | [vue3-element-admin](https://gitcode.com/youlai/vue3-element-admin) |
-| vue3-element-admin JS Version | [vue3-element-admin-js](https://gitee.com/youlaiorg/vue3-element-admin-js) | [vue3-element-admin-js](https://github.com/youlaitech/vue3-element-admin-js) | [vue3-element-admin-js](https://gitcode.com/youlai/vue3-element-admin-js) |
-| vue3-element-admin Lite Version | [vue3-element-template](https://gitee.com/youlaiorg/vue3-element-template) | [vue3-element-template](https://github.com/youlaitech/vue3-element-template) | [vue3-element-template](https://gitcode.com/youlai/vue3-element-template) |
-| vue-uniapp-admin Mobile Version | [vue-uniapp-admin](https://gitee.com/youlaiorg/vue-uniapp-admin) | [vue-uniapp-admin](https://github.com/youlaitech/vue-uniapp-admin) | [vue-uniapp-admin](https://gitcode.com/youlai/vue-uniapp-admin) |
-| Java Backend | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/haoxianrui/youlai-boot.git) | [youlai-boot](https://gitcode.com/youlai/youlai-boot.git) |
-| Java Multi-tenant Backend | [youlai-boot-tenant](https://gitee.com/youlaiorg/youlai-boot-tenant) | - | - |
-| Node Backend | [youlai-nest](https://gitee.com/youlaiorg/youlai-nest) | [youlai-nest](https://github.com/haoxianrui/youlai-nest.git) | [youlai-nest](https://gitcode.com/youlai/youlai-nest.git) |
+**Backend**
+
+| Project | Tech Stack | Description |
+|:-----|:-------|:-----|
+| [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | Spring Boot + MyBatis-Plus | Java Backend (Main) |
+| [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-think](https://gitee.com/youlaiorg/youlai-think) | ThinkPHP 8 | PHP |
+| [youlai-aspnet](https://gitee.com/youlaiorg/youlai-aspnet) | ASP.NET Core | C# |
+
+> **youlai-boot** also provides variants: [Multi-tenant](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) · [Multi-module](https://gitee.com/youlaiorg/youlai-boot/tree/multi-module)
+>
+> All six backends share the same **RESTful API** and **database schema**, frontends can switch seamlessly.
## Development Guide
@@ -199,15 +221,29 @@ Thanks to all the contributors!
[](https://github.com/youlaitech/vue3-element-admin/graphs/contributors)
-## Special Thanks
+---
-- Thanks to the [GitCode](https://gitcode.com/) official [G-Star](https://gitcode.com/g-star) certification
- 
+
+
+
+ 
+ WeChat Official Account
+ |
+ |
+
+ 
+ Mini Program
+ |
+ |
+
+ 
+ Add Author WeChat
+ |
+
+
-## Community
+Technical Exchange · Issue Feedback · Business Cooperation
-① Follow the "Youlai Tech" WeChat Official Account, click the **Group Chat** menu to get the QR code (this measure is taken to prevent ads from entering the group, thanks for your understanding and support).
+## License
-② Directly add WeChat **`haoxianrui`** with a note indicating "Frontend/Backend/Full Stack".
-
-
+[MIT](LICENSE)
diff --git a/README.md b/README.md
index aac3b433..f024ca69 100644
--- a/README.md
+++ b/README.md
@@ -1,25 +1,18 @@
-

-
vue3-element-admin
-

-

-

-

+

-
-
-
-
-
-
-
-
-
+# vue3-element-admin
+
+**Vue3 + Vite + TypeScript 企业级后台管理前端**
+
+[](https://vuejs.org/)
+[](https://element-plus.org/)
+[](https://gitee.com/youlaiorg/vue3-element-admin/stargazers)
+[](https://github.com/youlaitech/vue3-element-admin)
+[](https://gitcode.com/youlai/vue3-element-admin/stargazers)
+[](LICENSE)
-
-
-

@@ -45,31 +38,61 @@
- **基础设施:** 提供国际化、多布局、暗黑模式、全屏、水印、接口文档和代码生成器等功能。
- **持续更新**:项目持续开源更新,实时更新工具和依赖。
-## 项目截图
+## 系统预览
-🖥️ **控制台**
+**PC 端**
-
+
+
+  |
+  |
+
+
+  |
+  |
+
+
+  |
+  |
+
+
-⚡**接口文档**
+**移动端**
-
+
-📲 **移动端**
+## 生态矩阵
-
+**前端**
-## 项目源码
+| 项目 | 技术栈 | 说明 |
+|:-----|:-------|:-----|
+| [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 |
-| 项目 | Gitee | Github | GitCode |
-| ------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
-| vue3-element-admin ✅ | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) | [vue3-element-admin](https://gitcode.com/youlai/vue3-element-admin) |
-| vue3-element-admin JS版 | [vue3-element-admin-js](https://gitee.com/youlaiorg/vue3-element-admin-js) | [vue3-element-admin-js](https://github.com/youlaitech/vue3-element-admin-js) | [vue3-element-admin-js](https://gitcode.com/youlai/vue3-element-admin-js) |
-| vue3-element-admin 精简版 | [vue3-element-template](https://gitee.com/youlaiorg/vue3-element-template) | [vue3-element-template](https://github.com/youlaitech/vue3-element-template) | [vue3-element-template](https://gitcode.com/youlai/vue3-element-template) |
-| vue-uniapp-admin 移动版 | [vue-uniapp-admin](https://gitee.com/youlaiorg/vue-uniapp-admin) | [vue-uniapp-admin](https://github.com/youlaitech/vue-uniapp-admin) | [vue-uniapp-admin](https://gitcode.com/youlai/vue-uniapp-admin) |
-| Java 后端 | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/haoxianrui/youlai-boot.git) | [youlai-boot](https://gitcode.com/youlai/youlai-boot.git) |
-| Java 多租户后端 | [youlai-boot-tenant](https://gitee.com/youlaiorg/youlai-boot-tenant) | - | - |
-| Node 后端 | [youlai-nest](https://gitee.com/youlaiorg/youlai-nest) | [youlai-nest](https://github.com/haoxianrui/youlai-nest.git) | [youlai-nest](https://gitcode.com/youlai/youlai-nest.git) |
+**后端**
+
+| 项目 | 技术栈 | 说明 |
+|:-----|:-------|:-----|
+| [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-think](https://gitee.com/youlaiorg/youlai-think) | ThinkPHP 8 | PHP |
+| [youlai-aspnet](https://gitee.com/youlaiorg/youlai-aspnet) | ASP.NET Core | C# |
+
+> **youlai-boot** 还提供以下变种和分支版本:[多租户](https://gitee.com/youlaiorg/youlai-boot-tenant)(Spring Boot 4)· [MyBatis-Flex](https://gitee.com/youlaiorg/youlai-boot-flex)(Spring Boot 4)· [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 规范** 和 **数据库结构**,前端可无缝切换。
## 开发指南
@@ -195,15 +218,25 @@ Thanks to all the contributors!
[](https://github.com/youlaitech/vue3-element-admin/graphs/contributors)
-## 特别感谢
+---
-- 感谢 [GitCode](https://gitcode.com/) 官方的 [G-Star](https://gitcode.com/g-star) 认证
- 
+
+
+
+ 
+ 公众号「有来技术」
+ |
+ |
+
+ 
+ 小程序「有来技术」
+ |
+ |
+
+ 
+ 添加作者微信
+ |
+
+
-## 加群交流
-
-① 关注「有来技术」公众号,点击菜单 **交流群** 获取加群二维码(此举防止广告进群,感谢理解和支持)。
-
-② 直接添加微信 **`haoxianrui`** 备注「前端/后端/全栈」。
-
-
+技术交流 · 问题反馈 · 商务合作
diff --git a/src/assets/images/preview/app-01.png b/src/assets/images/preview/app-01.png
new file mode 100644
index 00000000..bfb8b98a
Binary files /dev/null and b/src/assets/images/preview/app-01.png differ
diff --git a/src/assets/images/preview/app-02.png b/src/assets/images/preview/app-02.png
new file mode 100644
index 00000000..f781ee5e
Binary files /dev/null and b/src/assets/images/preview/app-02.png differ
diff --git a/src/assets/images/preview/app-03.png b/src/assets/images/preview/app-03.png
new file mode 100644
index 00000000..ba0a9f3d
Binary files /dev/null and b/src/assets/images/preview/app-03.png differ
diff --git a/src/assets/images/preview/app-04.png b/src/assets/images/preview/app-04.png
new file mode 100644
index 00000000..49dfebc1
Binary files /dev/null and b/src/assets/images/preview/app-04.png differ
diff --git a/src/assets/images/preview/pc-01.png b/src/assets/images/preview/pc-01.png
new file mode 100644
index 00000000..9a55511b
Binary files /dev/null and b/src/assets/images/preview/pc-01.png differ
diff --git a/src/assets/images/preview/pc-02.png b/src/assets/images/preview/pc-02.png
new file mode 100644
index 00000000..396b6b99
Binary files /dev/null and b/src/assets/images/preview/pc-02.png differ
diff --git a/src/assets/images/preview/pc-03.png b/src/assets/images/preview/pc-03.png
new file mode 100644
index 00000000..8e36c3ec
Binary files /dev/null and b/src/assets/images/preview/pc-03.png differ
diff --git a/src/assets/images/preview/pc-04.png b/src/assets/images/preview/pc-04.png
new file mode 100644
index 00000000..99e65803
Binary files /dev/null and b/src/assets/images/preview/pc-04.png differ
diff --git a/src/assets/images/preview/pc-05.png b/src/assets/images/preview/pc-05.png
new file mode 100644
index 00000000..acade2d2
Binary files /dev/null and b/src/assets/images/preview/pc-05.png differ
diff --git a/src/assets/images/preview/pc-06.png b/src/assets/images/preview/pc-06.png
new file mode 100644
index 00000000..9a479f36
Binary files /dev/null and b/src/assets/images/preview/pc-06.png differ
diff --git a/src/assets/images/qr/wechat-mp.jpg b/src/assets/images/qr/wechat-mp.jpg
new file mode 100644
index 00000000..8c06ee37
Binary files /dev/null and b/src/assets/images/qr/wechat-mp.jpg differ
diff --git a/src/assets/images/qr/wechat-offical.png b/src/assets/images/qr/wechat-offical.png
new file mode 100644
index 00000000..406447c8
Binary files /dev/null and b/src/assets/images/qr/wechat-offical.png differ
diff --git a/src/assets/images/qr/wechat-personal.png b/src/assets/images/qr/wechat-personal.png
new file mode 100644
index 00000000..4539e721
Binary files /dev/null and b/src/assets/images/qr/wechat-personal.png differ
diff --git a/src/views/codegen/components/GeneratorDrawer.vue b/src/views/codegen/components/GeneratorDrawer.vue
index 24957868..87dabf9c 100644
--- a/src/views/codegen/components/GeneratorDrawer.vue
+++ b/src/views/codegen/components/GeneratorDrawer.vue
@@ -88,6 +88,8 @@
:overwrite-mode="overwriteMode"
:write-progress="writeProgress"
:write-running="writeRunning"
+ @update:write-scope="writeScope = $event"
+ @update:overwrite-mode="overwriteMode = $event"
@pick-frontend-dir="pickFrontendDir"
@pick-backend-dir="pickBackendDir"
@confirm-write="confirmWrite"
diff --git a/src/views/codegen/components/PreviewStep.vue b/src/views/codegen/components/PreviewStep.vue
index f459c9c7..af4d0178 100644
--- a/src/views/codegen/components/PreviewStep.vue
+++ b/src/views/codegen/components/PreviewStep.vue
@@ -162,10 +162,10 @@ const props = defineProps<{
}>();
const emit = defineEmits<{
- (e: "update:previewScope", val: "all" | "frontend" | "backend"): void;
- (e: "update:previewTypes", val: string[]): void;
- (e: "file-click", data: any): void;
- (e: "copy"): void;
+ (_e: "update:previewScope", _val: "all" | "frontend" | "backend"): void;
+ (_e: "update:previewTypes", _val: string[]): void;
+ (_e: "file-click", _data: any): void;
+ (_e: "copy"): void;
}>();
const cmRef = ref();
diff --git a/src/views/codegen/composables/useLocalWrite.ts b/src/views/codegen/composables/useLocalWrite.ts
index c2e1d07a..b3f03401 100644
--- a/src/views/codegen/composables/useLocalWrite.ts
+++ b/src/views/codegen/composables/useLocalWrite.ts
@@ -93,7 +93,8 @@ export function useLocalWrite(genConfigFormData: Ref) {
) {
const normalized = filePath.replace(/\\/g, "/");
const parts = normalized.split("/").filter(Boolean);
- const fileName = parts.pop()!;
+ const fileName = parts.pop();
+ if (!fileName) return;
const targetDir = await ensureDir(dirHandle, parts, true);
const fileHandle = await targetDir.getFileHandle(fileName, { create: true });
const writable = await fileHandle.createWritable();
@@ -108,7 +109,8 @@ export function useLocalWrite(genConfigFormData: Ref) {
try {
const normalized = filePath.replace(/\\/g, "/");
const parts = normalized.split("/").filter(Boolean);
- const fileName = parts.pop()!;
+ const fileName = parts.pop();
+ if (!fileName) return false;
const targetDir = await ensureDir(dirHandle, parts, false);
await targetDir.getFileHandle(fileName, { create: false });
return true;
@@ -125,7 +127,8 @@ export function useLocalWrite(genConfigFormData: Ref) {
try {
const normalized = filePath.replace(/\\/g, "/");
const parts = normalized.split("/").filter(Boolean);
- const fileName = parts.pop()!;
+ const fileName = parts.pop();
+ if (!fileName) return false;
const targetDir = await ensureDir(dirHandle, parts, false);
const fileHandle = await targetDir.getFileHandle(fileName, { create: false });
const file = await fileHandle.getFile();
@@ -172,7 +175,8 @@ export function useLocalWrite(genConfigFormData: Ref) {
async function worker() {
while (queue.length) {
- const item = queue.shift()!;
+ const item = queue.shift();
+ if (!item) break;
try {
await (async () => {
const root = resolveRootForItem(item);
@@ -180,7 +184,9 @@ export function useLocalWrite(genConfigFormData: Ref) {
writeProgress.current = relativePath;
const targetRoot =
- root === "frontend" ? frontendDirHandle.value! : backendDirHandle.value!;
+ root === "frontend" ? frontendDirHandle.value : backendDirHandle.value;
+
+ if (!targetRoot) return;
if (overwriteMode.value === "ifChanged") {
const same = await isSameFile(targetRoot, relativePath, item.content || "");