From 2a2bf7f0365c1392539b3ed793c4803e0de4c04a Mon Sep 17 00:00:00 2001 From: pixel <303176530@qq.com> Date: Fri, 6 Nov 2020 16:01:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=8A=A8=E5=8C=96?= =?UTF-8?q?=E7=94=9F=E6=88=90=E8=A1=A8=E5=8D=95=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=87=AA=E5=8A=A8=E5=8C=96=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=9A=84=E6=96=87=E4=BB=B6=E5=A4=B9=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E6=9B=B4=E5=8A=A0=E8=A7=84=E8=8C=83=E5=8C=96=EF=BC=8C?= =?UTF-8?q?css=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../template/{te => server}/api.go.tpl | 0 .../template/{te => server}/model.go.tpl | 0 .../template/{te => server}/request.go.tpl | 0 .../template/{te => server}/router.go.tpl | 0 .../template/{te => server}/service.go.tpl | 0 .../resource/template/{fe => web}/api.js.tpl | 0 server/resource/template/web/form.vue.tpl | 125 ++++++++++++++++++ .../template/{fe => web}/table.vue.tpl | 2 + server/service/sys_auto_code.go | 2 +- web/src/style/main.scss | 6 +- 10 files changed, 132 insertions(+), 3 deletions(-) rename server/resource/template/{te => server}/api.go.tpl (100%) rename server/resource/template/{te => server}/model.go.tpl (100%) rename server/resource/template/{te => server}/request.go.tpl (100%) rename server/resource/template/{te => server}/router.go.tpl (100%) rename server/resource/template/{te => server}/service.go.tpl (100%) rename server/resource/template/{fe => web}/api.js.tpl (100%) create mode 100644 server/resource/template/web/form.vue.tpl rename server/resource/template/{fe => web}/table.vue.tpl (99%) diff --git a/server/resource/template/te/api.go.tpl b/server/resource/template/server/api.go.tpl similarity index 100% rename from server/resource/template/te/api.go.tpl rename to server/resource/template/server/api.go.tpl diff --git a/server/resource/template/te/model.go.tpl b/server/resource/template/server/model.go.tpl similarity index 100% rename from server/resource/template/te/model.go.tpl rename to server/resource/template/server/model.go.tpl diff --git a/server/resource/template/te/request.go.tpl b/server/resource/template/server/request.go.tpl similarity index 100% rename from server/resource/template/te/request.go.tpl rename to server/resource/template/server/request.go.tpl diff --git a/server/resource/template/te/router.go.tpl b/server/resource/template/server/router.go.tpl similarity index 100% rename from server/resource/template/te/router.go.tpl rename to server/resource/template/server/router.go.tpl diff --git a/server/resource/template/te/service.go.tpl b/server/resource/template/server/service.go.tpl similarity index 100% rename from server/resource/template/te/service.go.tpl rename to server/resource/template/server/service.go.tpl diff --git a/server/resource/template/fe/api.js.tpl b/server/resource/template/web/api.js.tpl similarity index 100% rename from server/resource/template/fe/api.js.tpl rename to server/resource/template/web/api.js.tpl diff --git a/server/resource/template/web/form.vue.tpl b/server/resource/template/web/form.vue.tpl new file mode 100644 index 00000000..811cd8c0 --- /dev/null +++ b/server/resource/template/web/form.vue.tpl @@ -0,0 +1,125 @@ + + + + + \ No newline at end of file diff --git a/server/resource/template/fe/table.vue.tpl b/server/resource/template/web/table.vue.tpl similarity index 99% rename from server/resource/template/fe/table.vue.tpl rename to server/resource/template/web/table.vue.tpl index a184bca3..02018627 100644 --- a/server/resource/template/fe/table.vue.tpl +++ b/server/resource/template/web/table.vue.tpl @@ -149,11 +149,13 @@ export default { type: "", deleteVisible: false, multipleSelection: [], + {{- range .Fields}} {{- if .DictType }} {{ .DictType }}Options:[], {{ end -}} {{end -}} + formData: { {{range .Fields}} {{- if eq .FieldType "bool" -}} diff --git a/server/service/sys_auto_code.go b/server/service/sys_auto_code.go index df158535..41668ba7 100644 --- a/server/service/sys_auto_code.go +++ b/server/service/sys_auto_code.go @@ -46,7 +46,7 @@ func CreateTemp(autoCode model.AutoCodeStruct) (err error) { } // 生成文件路径,填充 autoCodePath 字段,readme.txt.tpl不符合规则,需要特殊处理 - // resource/template/fe/api.js.tpl -> autoCode/fe/autoCode.PackageName/api/autoCode.PackageName.js + // resource/template/web/api.js.tpl -> autoCode/web/autoCode.PackageName/api/autoCode.PackageName.js // resource/template/readme.txt.tpl -> autoCode/readme.txt autoPath := "autoCode/" for index, value := range dataList { diff --git a/web/src/style/main.scss b/web/src/style/main.scss index 99803297..f56af3b4 100644 --- a/web/src/style/main.scss +++ b/web/src/style/main.scss @@ -1066,6 +1066,8 @@ $mainHight: 100vh; .layout-cont { .right-box { + height: $height-header; + line-height: $height-header; text-align: center; vertical-align: middle; margin-right: 40px; @@ -1088,8 +1090,8 @@ $mainHight: 100vh; padding: 0 24px; } .fl-right { - height: $height-header; - line-height: $height-header; + // height: $height-header; + // line-height: $height-header; } &.el-main { overflow: auto;