- *.xlsx / *.xls
+ 格式为*.xlsx / *.xls,文件不超过一个
{
+ importFormData.files.length = 0;
+};
+
const handleClose = () => {
+ emptyFileList();
dialogVisible.value = false;
};
From dd26f00e8741333f9b1b2b04554b764ebfe3c127 Mon Sep 17 00:00:00 2001
From: ray <1490493387@qq.com>
Date: Mon, 29 Jul 2024 13:00:05 +0800
Subject: [PATCH 2/5] =?UTF-8?q?docs:=20:memo:=20=E9=A1=B9=E7=9B=AE?=
=?UTF-8?q?=E5=90=AF=E5=8A=A8=E8=AF=B4=E6=98=8E=E6=B7=BB=E5=8A=A0=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AEPNPM=E9=95=9C=E5=83=8F=E6=BA=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 5566178c..8f77ab89 100644
--- a/README.md
+++ b/README.md
@@ -17,7 +17,7 @@
## 项目简介
-[vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) 是基于 Vue3 + Vite5+ TypeScript5 + Element-Plus + Pinia 等主流技术栈构建的免费开源的后台管理前端模板(配套[后端源码](https://gitee.com/youlaiorg/youlai-boot))。
+[vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) 是基于 Vue3 + Vite5+ TypeScript5 + Element-Plus + Pinia 等主流技术栈构建的免费开源的中后台管理的前端模板(配套[Java 后端源码](https://gitee.com/youlaiorg/youlai-boot))。
## 项目特色
@@ -70,6 +70,9 @@ cd vue3-element-admin
# 安装 pnpm
npm install pnpm -g
+# 设置镜像源(可忽略)
+pnpm config set registry https://registry.npmmirror.com
+
# 安装依赖
pnpm install
@@ -86,7 +89,7 @@ pnpm run dev
pnpm run build
# 上传文件至远程服务器
-将打包生成在 `dist` 目录下的文件拷贝至 `/usr/share/nginx/html` 目录
+将本地打包生成的 dist 目录下的所有文件拷贝至服务器的 /usr/share/nginx/html 目录。
# nginx.cofig 配置
server {
From 7af2d57dcd9a20b6af6c11d4fe8896df8d6337fe Mon Sep 17 00:00:00 2001
From: ray <1490493387@qq.com>
Date: Mon, 29 Jul 2024 13:01:24 +0800
Subject: [PATCH 3/5] =?UTF-8?q?chore:=20:hammer:=20=E7=A7=BB=E9=99=A4=20pa?=
=?UTF-8?q?ckageManager=20=E8=8A=82=E7=82=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/package.json b/package.json
index b2445f9f..85f66c66 100644
--- a/package.json
+++ b/package.json
@@ -125,6 +125,5 @@
"license": "MIT",
"engines": {
"node": ">=18.0.0"
- },
- "packageManager": "pnpm@9.1.3+sha512.7c2ea089e1a6af306409c4fc8c4f0897bdac32b772016196c469d9428f1fe2d5a21daf8ad6512762654ac645b5d9136bb210ec9a00afa8dbc4677843ba362ecd"
+ }
}
From 334393bbdece0be826e6dbd2f7f5832110def67b Mon Sep 17 00:00:00 2001
From: ray <1490493387@qq.com>
Date: Mon, 29 Jul 2024 13:02:32 +0800
Subject: [PATCH 4/5] =?UTF-8?q?perf:=20:zap:=20=E6=B7=BB=E5=8A=A0=E6=AD=A5?=
=?UTF-8?q?=E9=AA=A4=E6=9D=A1=E6=A0=B7=E5=BC=8F=E8=87=B3=E9=A2=84=E6=9E=84?=
=?UTF-8?q?=E5=BB=BA=E9=98=B6=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
vite.config.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/vite.config.ts b/vite.config.ts
index d8224777..7a850b13 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -205,6 +205,8 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
"element-plus/es/components/skeleton/style/css",
"element-plus/es/components/skeleton-item/style/css",
"element-plus/es/components/badge/style/css",
+ "element-plus/es/components/steps/style/css",
+ "element-plus/es/components/step/style/css",
],
},
// 构建配置
From 6ea3a4747df868e6d98050f1185abf1f8e4102d5 Mon Sep 17 00:00:00 2001
From: ray <1490493387@qq.com>
Date: Mon, 29 Jul 2024 13:04:29 +0800
Subject: [PATCH 5/5] =?UTF-8?q?fix:=20:bug:=20=E4=BB=A3=E7=A0=81=E7=94=9F?=
=?UTF-8?q?=E6=88=90=E6=AD=A5=E9=AA=A4=E6=9D=A1=E6=98=BE=E7=A4=BA=E7=8A=B6?=
=?UTF-8?q?=E6=80=81=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE=E9=A2=98=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/generator/index.vue | 52 ++++++++++++++++++-----------------
1 file changed, 27 insertions(+), 25 deletions(-)
diff --git a/src/views/generator/index.vue b/src/views/generator/index.vue
index ae0ad75b..07563aec 100644
--- a/src/views/generator/index.vue
+++ b/src/views/generator/index.vue
@@ -82,7 +82,7 @@
-
+
@@ -124,7 +124,7 @@
-
+
+
-
+
{{ prevBtnText }}
{{ nextBtnText }}
-
+
@@ -357,14 +358,22 @@ const cmOptions: EditorConfiguration = {
const prevBtnText = ref("");
const nextBtnText = ref("下一步,字段配置");
-const active = ref(1);
+const active = ref(0);
+
+interface TreeNode {
+ label: string;
+ content?: string;
+ children?: TreeNode[];
+}
+
+const treeData = ref([]);
function handlePrevClick() {
- if (active.value-- <= 1) active.value = 1;
+ if (active.value-- <= 0) active.value = 0;
}
function handleNextClick() {
- if (active.value === 2) {
+ if (active.value === 1) {
// 保存生成配置
const tableName = formData.value.tableName;
if (!tableName) {
@@ -378,24 +387,24 @@ function handleNextClick() {
handlePreview(tableName);
})
.then(() => {
- if (active.value++ >= 3) active.value = 3;
+ if (active.value++ >= 2) active.value = 2;
})
.finally(() => {
loading.value = false;
loadingText.value = "loading...";
});
} else {
- if (active.value++ >= 3) active.value = 3;
+ if (active.value++ >= 2) active.value = 2;
}
}
watch(active, (val) => {
- if (val === 1) {
+ if (val === 0) {
nextBtnText.value = "下一步,字段配置";
- } else if (val === 2) {
+ } else if (val === 1) {
prevBtnText.value = "上一步,基础配置";
nextBtnText.value = "下一步,确认生成";
- } else if (val === 3) {
+ } else if (val === 2) {
prevBtnText.value = "上一步,字段配置";
nextBtnText.value = "下载代码";
}
@@ -424,14 +433,6 @@ function handleCloseDialog() {
dialog.visible = false;
}
-interface TreeNode {
- label: string;
- content?: string;
- children?: TreeNode[];
-}
-
-const treeData = ref([]);
-
/** 打开弹窗 */
function handleOpenDialog(tableName: string) {
dialog.visible = true;
@@ -439,10 +440,10 @@ function handleOpenDialog(tableName: string) {
dialog.title = `${tableName} 代码生成`;
formData.value = data;
if (formData.value.id) {
- active.value = 3;
+ active.value = 2;
handlePreview(tableName);
} else {
- active.value = 1;
+ active.value = 0;
}
});
}
@@ -485,11 +486,11 @@ function buildTree(
// 定义特殊路径
// TODO: 如果菜单有多个节点,需要将此菜单作为独立一级的节点,而不是合并到上一级。 按照此规则, com.youlai.system 则是三个节点,而不是合并到一起,但是这里需要将 com.youlai.system 合并到一起,所以需要特殊处理
const specialPaths = [
- "com\\youlai\\system",
- "src\\main",
+ "src/main",
"java",
"youlai-boot",
"vue3-element-admin",
+ "com/youlai/system",
];
// 检查路径中的特殊部分并合并它们
@@ -499,6 +500,7 @@ function buildTree(
parts.forEach((part) => {
buffer.push(part);
const currentPath = buffer.join(separator);
+ console.log("currentPath", currentPath);
if (specialPaths.includes(currentPath)) {
mergedParts.push(currentPath);
buffer = [];