docs: 说明文档调整和已知警告问题修复
@@ -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 检查
|
||||
},
|
||||
|
||||
130
README.en-US.md
@@ -1,35 +1,27 @@
|
||||
<div align="center">
|
||||
<img alt="vue3-element-admin" width="80" height="80" src="./src/assets/images/logo.png">
|
||||
<h1>vue3-element-admin</h1>
|
||||
|
||||
<img src="https://img.shields.io/badge/Vue-3.5.22-brightgreen.svg"/>
|
||||
<img src="https://img.shields.io/badge/Vite-7.3.0-green.svg"/>
|
||||
<img src="https://img.shields.io/badge/Element Plus-2.3.2-blue.svg"/>
|
||||
<img src="https://img.shields.io/badge/license-MIT-green.svg"/>
|
||||
<a href="https://gitee.com/youlaiorg" target="_blank">
|
||||
<img src="https://img.shields.io/badge/Author-%E6%9C%89%E6%9D%A5%E5%BC%80%E6%BA%90%E7%BB%84%E7%BB%87-orange.svg"/>
|
||||
</a>
|
||||
<img alt="vue3-element-admin" width="80" src="./src/assets/images/logo.png">
|
||||
|
||||
<a href="https://gitee.com/youlaiorg/vue3-element-admin" target="_blank">
|
||||
<img alt="有来技术" src="https://gitee.com/youlaiorg/vue3-element-admin/badge/star.svg"/>
|
||||
</a>
|
||||
<a href="https://github.com/youlaitech/vue3-element-admin" target="_blank">
|
||||
<img alt="有来技术" src="https://img.shields.io/github/stars/youlaitech/vue3-element-admin.svg?style=social&label=Stars"/>
|
||||
</a>
|
||||
<a href="https://gitcode.com/youlai/vue3-element-admin" target="_blank">
|
||||
<img alt="有来技术" src="https://gitcode.com/youlai/vue3-element-admin/star/badge.svg"/>
|
||||
</a>
|
||||
# vue3-element-admin
|
||||
|
||||
<a href="https://atomgit.com/youlai/vue3-element-admin" target="_blank">
|
||||
<img alt="有来技术" src="https://atomgit.com/youlai/vue3-element-admin/star/2025top.svg"/>
|
||||
</a>
|
||||
**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)
|
||||
|
||||
</div>
|
||||
|
||||

|
||||
|
||||
<div align="center">
|
||||
<a target="_blank" href="https://vue.youlai.tech">🖥️ Live Preview</a> | <a target="_blank" href="https://app.youlai.tech">📲 Mobile Preview</a> | <a target="_blank" href="https://juejin.cn/post/7228990409909108793">📑 Documentation</a>| <a target="_blank" href="https://www.youlai.tech//vue3-element-admin">🌐 Official Website</a> | <a href="./README.md">💬 中文</a> | <a href="./README.en-US.md">💬 English</a>
|
||||
|
||||
[🖥️ Live Preview](https://vue.youlai.tech) | [<EFBFBD> Mobile Preview](https://app.youlai.tech) | [<EFBFBD> Documentation](https://www.youlai.tech/vue3-element-admin) | [💬 中文](README.md)
|
||||
|
||||
</div>
|
||||
|
||||
## 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**
|
||||
|
||||

|
||||
<table align="center">
|
||||
<tr>
|
||||
<td><img alt="PC Preview 1" width="400" src="./src/assets/images/preview/pc-01.png"></td>
|
||||
<td><img alt="PC Preview 2" width="400" src="./src/assets/images/preview/pc-02.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img alt="PC Preview 3" width="400" src="./src/assets/images/preview/pc-03.png"></td>
|
||||
<td><img alt="PC Preview 4" width="400" src="./src/assets/images/preview/pc-04.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img alt="PC Preview 5" width="400" src="./src/assets/images/preview/pc-05.png"></td>
|
||||
<td><img alt="PC Preview 6" width="400" src="./src/assets/images/preview/pc-06.png"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
⚡**API Documentation**
|
||||
**Mobile**
|
||||
|
||||

|
||||
<table align="center">
|
||||
<tr>
|
||||
<td><img alt="APP Preview 1" width="200" src="./src/assets/images/preview/app-01.png"></td>
|
||||
<td><img alt="APP Preview 2" width="200" src="./src/assets/images/preview/app-02.png"></td>
|
||||
<td><img alt="APP Preview 3" width="200" src="./src/assets/images/preview/app-03.png"></td>
|
||||
<td><img alt="APP Preview 4" width="200" src="./src/assets/images/preview/app-04.png"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
📲 **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
|
||||

|
||||
<table align="center">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<img src="./src/assets/images/qr/wechat-offical.png" height="180" alt="WeChat Official Account"><br>
|
||||
<sub>WeChat Official Account</sub>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td align="center">
|
||||
<img src="./src/assets/images/qr/wechat-mp.jpg" height="180" alt="Mini Program"><br>
|
||||
<sub>Mini Program</sub>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td align="center">
|
||||
<img src="./src/assets/images/qr/wechat-personal.png" height="180" alt="Add Author WeChat"><br>
|
||||
<sub>Add Author WeChat</sub>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Community
|
||||
<p align="center"><em>Technical Exchange · Issue Feedback · Business Cooperation</em></p>
|
||||
|
||||
① 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)
|
||||
|
||||
123
README.md
@@ -1,25 +1,18 @@
|
||||
<div align="center">
|
||||
<img alt="vue3-element-admin" width="80" height="80" src="./src/assets/images/logo.png">
|
||||
<h1>vue3-element-admin</h1>
|
||||
|
||||
<img src="https://img.shields.io/badge/Vue-3.5.30-brightgreen.svg"/>
|
||||
<img src="https://img.shields.io/badge/Vite-8.0.0-green.svg"/>
|
||||
<img src="https://img.shields.io/badge/Element Plus-2.13.6-blue.svg"/>
|
||||
<img src="https://img.shields.io/badge/license-MIT-green.svg"/>
|
||||
<img alt="vue3-element-admin" width="80" src="./src/assets/images/logo.png">
|
||||
|
||||
<a href="https://gitee.com/youlaiorg/vue3-element-admin" target="_blank">
|
||||
<img alt="有来技术" src="https://gitee.com/youlaiorg/vue3-element-admin/badge/star.svg"/>
|
||||
</a>
|
||||
<a href="https://github.com/youlaitech/vue3-element-admin" target="_blank">
|
||||
<img alt="有来技术" src="https://img.shields.io/github/stars/youlaitech/vue3-element-admin.svg?style=social&label=Stars"/>
|
||||
</a>
|
||||
<a href="https://gitcode.com/youlai/vue3-element-admin" target="_blank">
|
||||
<img alt="有来技术" src="https://gitcode.com/youlai/vue3-element-admin/star/badge.svg"/>
|
||||
</a>
|
||||
# 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)
|
||||
|
||||
<a href="https://atomgit.com/youlai/vue3-element-admin" target="_blank">
|
||||
<img alt="有来技术" src="https://atomgit.com/youlai/vue3-element-admin/star/2025top.svg"/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||

|
||||
@@ -45,31 +38,61 @@
|
||||
- **基础设施:** 提供国际化、多布局、暗黑模式、全屏、水印、接口文档和代码生成器等功能。
|
||||
- **持续更新**:项目持续开源更新,实时更新工具和依赖。
|
||||
|
||||
## 项目截图
|
||||
## 系统预览
|
||||
|
||||
🖥️ **控制台**
|
||||
**PC 端**
|
||||
|
||||

|
||||
<table align="center">
|
||||
<tr>
|
||||
<td><img alt="PC预览1" width="400" src="./src/assets/images/preview/pc-01.png"></td>
|
||||
<td><img alt="PC预览2" width="400" src="./src/assets/images/preview/pc-02.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img alt="PC预览3" width="400" src="./src/assets/images/preview/pc-03.png"></td>
|
||||
<td><img alt="PC预览4" width="400" src="./src/assets/images/preview/pc-04.png"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img alt="PC预览5" width="400" src="./src/assets/images/preview/pc-05.png"></td>
|
||||
<td><img alt="PC预览6" width="400" src="./src/assets/images/preview/pc-06.png"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
⚡**接口文档**
|
||||
**移动端**
|
||||
|
||||

|
||||
<table align="center">
|
||||
<tr>
|
||||
<td><img alt="APP预览1" width="200" src="./src/assets/images/preview/app-01.png"></td>
|
||||
<td><img alt="APP预览2" width="200" src="./src/assets/images/preview/app-02.png"></td>
|
||||
<td><img alt="APP预览3" width="200" src="./src/assets/images/preview/app-03.png"></td>
|
||||
<td><img alt="APP预览4" width="200" src="./src/assets/images/preview/app-04.png"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
📲 **移动端**
|
||||
## 生态矩阵
|
||||
|
||||

|
||||
**前端**
|
||||
|
||||
## 项目源码
|
||||
| 项目 | 技术栈 | 说明 |
|
||||
|:-----|:-------|:-----|
|
||||
| [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) 认证
|
||||

|
||||
<table align="center">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<img src="./src/assets/images/qr/wechat-offical.png" height="180" alt="公众号「有来技术」"><br>
|
||||
<sub>公众号「有来技术」</sub>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td align="center">
|
||||
<img src="./src/assets/images/qr/wechat-mp.jpg" height="180" alt="小程序「有来技术」"><br>
|
||||
<sub>小程序「有来技术」</sub>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td align="center">
|
||||
<img src="./src/assets/images/qr/wechat-personal.png" height="180" alt="添加作者微信"><br>
|
||||
<sub>添加作者微信</sub>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## 加群交流
|
||||
|
||||
① 关注「有来技术」公众号,点击菜单 **交流群** 获取加群二维码(此举防止广告进群,感谢理解和支持)。
|
||||
|
||||
② 直接添加微信 **`haoxianrui`** 备注「前端/后端/全栈」。
|
||||
|
||||

|
||||
<p align="center"><em>技术交流 · 问题反馈 · 商务合作</em></p>
|
||||
|
||||
BIN
src/assets/images/preview/app-01.png
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
src/assets/images/preview/app-02.png
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
BIN
src/assets/images/preview/app-03.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
src/assets/images/preview/app-04.png
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
src/assets/images/preview/pc-01.png
Normal file
|
After Width: | Height: | Size: 487 KiB |
BIN
src/assets/images/preview/pc-02.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
src/assets/images/preview/pc-03.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
src/assets/images/preview/pc-04.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
src/assets/images/preview/pc-05.png
Normal file
|
After Width: | Height: | Size: 86 KiB |
BIN
src/assets/images/preview/pc-06.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
src/assets/images/qr/wechat-mp.jpg
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
src/assets/images/qr/wechat-offical.png
Normal file
|
After Width: | Height: | Size: 4.1 MiB |
BIN
src/assets/images/qr/wechat-personal.png
Normal file
|
After Width: | Height: | Size: 306 KiB |
@@ -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"
|
||||
|
||||
@@ -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<CmComponentRef>();
|
||||
|
||||
@@ -93,7 +93,8 @@ export function useLocalWrite(genConfigFormData: Ref<GenConfigForm>) {
|
||||
) {
|
||||
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<GenConfigForm>) {
|
||||
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<GenConfigForm>) {
|
||||
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<GenConfigForm>) {
|
||||
|
||||
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<GenConfigForm>) {
|
||||
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 || "");
|
||||
|
||||