diff --git a/src/main/resources/static/src/views/database/DatabaseGeneratorPage.js b/src/main/resources/static/src/components/AppGeneratorPage.js similarity index 99% rename from src/main/resources/static/src/views/database/DatabaseGeneratorPage.js rename to src/main/resources/static/src/components/AppGeneratorPage.js index 6b002b4..eac08ed 100644 --- a/src/main/resources/static/src/views/database/DatabaseGeneratorPage.js +++ b/src/main/resources/static/src/components/AppGeneratorPage.js @@ -1,4 +1,4 @@ -const DatabaseGeneratorPage = defineComponent({ +const AppGeneratorPage = defineComponent({ name: "MainGeneratorPage", template: `
diff --git a/src/main/resources/static/src/lib/css/index.css b/src/main/resources/static/src/lib/css/index.css index cfaa931..c367a49 100644 --- a/src/main/resources/static/src/lib/css/index.css +++ b/src/main/resources/static/src/lib/css/index.css @@ -4,4 +4,4 @@ /* 引入Highlight.js的CSS */ @import url("highlight/atom-one-dark.min.css"); /* 添加自定义样式 */ -@import url("./style/style.css"); \ No newline at end of file +@import url("./style/style.css"); diff --git a/src/main/resources/static/src/lib/css/style/style.css b/src/main/resources/static/src/lib/css/style/style.css index cc824b8..aa718ae 100644 --- a/src/main/resources/static/src/lib/css/style/style.css +++ b/src/main/resources/static/src/lib/css/style/style.css @@ -18,4 +18,46 @@ .offcanvas.offcanvas-start { width: 100%; } +} + +/* 添加自定义样式 */ +.database-info-card { + border-left: 4px solid #0d6efd; + margin-top: 20px; +} + +.table-info-section { + background-color: #f8f9fa; + border-radius: 5px; + padding: 15px; + margin-bottom: 20px; +} + +.column-list { + max-height: 500px; + overflow-y: auto; +} + +.column-item { + border-left: 3px solid #6c757d; + margin-bottom: 10px; + transition: all 0.3s; +} + +.column-item:hover { + border-left-color: #0d6efd; + background-color: #f8f9fa; +} + +.badge-java { + background-color: #5382a1; +} + +.badge-jdbc { + background-color: #4479a1; +} + +.badge-js { + background-color: #f7df1e; + color: #000; } \ No newline at end of file diff --git a/src/main/resources/static/src/views/database/DatabaseForm.js b/src/main/resources/static/src/views/database/DatabaseForm.js index c79dfd0..7749112 100644 --- a/src/main/resources/static/src/views/database/DatabaseForm.js +++ b/src/main/resources/static/src/views/database/DatabaseForm.js @@ -63,93 +63,93 @@ const DatabaseForm = {
+
{{item}}
- -
- -
- - -
-
- - - -
-
- {{ errors.webTemplates }} -
+ +
+ +
+ +
- - -
- -
- - -
-
- - - -
-
- {{ errors.serverTemplates }} -
+
+ + +
- - -
-
- - - -
-
- - - -
-
- - - -
+
+ {{ errors.webTemplates }}
+
+ + +
+ +
+ + +
+
+ + + +
+
+ {{ errors.serverTemplates }} +
+
+ + +
+
+ + + +
+
+ + + +
+
+ + + +
+
@@ -289,7 +289,7 @@ const DatabaseForm = { this.downloadLoading = true; try { const response = await axiosInstance({ - url: "/vms/downloadByZip", + url: "/generator/downloadByZip", method: "POST", data: this.form, responseType: 'blob' // 重要:指定响应类型为blob diff --git a/src/main/resources/static/src/views/sql/SqlForm.js b/src/main/resources/static/src/views/sql/SqlForm.js new file mode 100644 index 0000000..e5ef400 --- /dev/null +++ b/src/main/resources/static/src/views/sql/SqlForm.js @@ -0,0 +1,413 @@ +const SqlForm = { + name: "MainForm", + template: ` +
+ + + + +
+
+ +
+ + +
+ {{ errors.author || '请输入作者名称' }} +
+
+
+ + +
+ {{ errors.requestMapping || '请输入requestMapping名称' }} +
+
+
+ + +
+ {{ errors.packageName || '请输入包名称' }} +
+
+
+ + +
+ {{ errors.simpleDateFormat || '请输入时间格式' }} +
+
+
+ + +
+ {{ errors.tablePrefixes || '请输入去除开头前缀' }} +
+
+
+ +