Skip to content

Commit 8675730

Browse files
committed
js本地化|云拆分
1 parent a9f38fd commit 8675730

File tree

13 files changed

+438
-35
lines changed

13 files changed

+438
-35
lines changed

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
![image](https://img.shields.io/badge/CodeGenerator-%E2%98%85%E2%98%85%E2%98%85%E2%98%85%E2%98%85-blue.svg)
77
[![Build Status](https://travis-ci.org/moshowgame/SpringBootCodeGenerator.svg?branch=master)](https://travis-ci.org/moshowgame/SpringBootCodeGenerator)
88

9-
#Author
9+
# Author
1010
>powered by `Moshow郑锴(大狼狗)` , [https://zhengkai.blog.csdn.net](https://zhengkai.blog.csdn.net)
1111
1212
# Description
@@ -57,7 +57,7 @@
5757
# Update Logs
5858
|更新日期|更新内容|
5959
|----|----|
60-
|2021.01.16|全新3.0版本:一、前端半vue半js化,更多动态加载项。二、支持更多生成设置,优化生成场景。|
60+
|2021.01.16|全新3.0版本:一、前端半vue半js化,更多动态加载项。二、支持更多生成设置,优化生成场景。三、js导入支持本地/CDN模式,支持断网环境轻松使用。|
6161
|2020.10.22|1.tinyint多加一个Short类型转换(感谢@wttHero的建议)|
6262
|2020.10.20|1.修复mapper2 insert代码问题(感谢@mXiaoWan的PR)<br>2.优化对fulltext/index关键字的处理(感谢@WEGFan的反馈)。<br>3.新增日期类型的转换选择(感谢@qingkediguo的建议)。<br>4.新增是否包装类型的转换选择。|
6363
|2020.06.28|优化Util下的BeanUtil,支持更多map.put的操作。整合CRUD模板到SQL(CRUD)模板。|
@@ -107,19 +107,16 @@
107107
|-|-|
108108
|packageName|自定义的包名|
109109
|authorName|自定义的作者名|
110-
|returnUtil|自定义的返回Util|
111110
|tableName|sql中的表名|
112111
|className|java类名|
113112
|classComment|sql表备注/java类备注|
114113
|fieldName|字段名|
115114
|fieldComment|字段备注|
116115

117-
# how to add a new template
118-
1. code-generator中找到对应分类,新增一个.ftl文件
119-
2. 根据类信息编写freemarker模板.ftl文件
120-
3. 修改template.json文件,新增模板信息
121-
4. index页面增加一个button
122-
5. reload,test,complete
116+
# How to add a new template
117+
1. `resources/templates/code-generator`中找到对应类型
118+
2. COPY并编写freemarker模板文件`.ftl`
119+
3. 修改`template.json`文件,新增模板信息,页面可动态加载
123120

124121
<img src="./codegenerator1.png">
125122
<img src="./codegenerator2.png">

generator-web/src/main/resources/statics/js/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ const vm = new Vue({
9696
//get value from codemirror
9797
vm.formData.tableSql=$.inputArea.getValue();
9898
axios.post("code/generate",vm.formData).then(function(res){
99+
if(res.code===500){
100+
error("生成失败");
101+
return;
102+
}
99103
//console.log(res.outputJson);
100104
vm.outputJson=res.outputJson;
101105
// console.log(vm.outputJson["bootstrap-ui"]);

generator-web/src/main/resources/statics/plugins/IE/html5shiv.min.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generator-web/src/main/resources/statics/plugins/IE/respond.min.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generator-web/src/main/resources/statics/plugins/axios/axios.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

generator-web/src/main/resources/statics/plugins/codemirror/clike.min.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)