|
|
@@ -129,21 +129,24 @@ public class GenCodeService {
|
|
|
|
|
|
int insertLocation = routerJs.indexOf("/**INSERT_LOCATION**/");
|
|
|
if (insertLocation > -1) {
|
|
|
+ String remark = model.getRemark();
|
|
|
String routeName = StringUtils.capitalize(model.getClassName());
|
|
|
String routePath = StringUtils.uncapitalize(model.getClassName());
|
|
|
String route = "{\n path: '/"
|
|
|
+ routePath
|
|
|
+ "Edit',\n name: '"
|
|
|
+ routeName
|
|
|
- + "Edit',\n component: () => import(/* webpackChunkName: \"" + routePath + "List\" */ '@/views/"
|
|
|
+ + "Edit',\n component: () => import(/* webpackChunkName: \"" + routePath + "Edit\" */ '@/views/"
|
|
|
+ routeName
|
|
|
- + "Edit.vue')\n },\n {\n path: '/"
|
|
|
+ + "Edit.vue'),\n meta: {\n title: '" + remark + "编辑',\n"
|
|
|
+ +" },\n },\n {\n path: '/"
|
|
|
+ routePath
|
|
|
+ "List',\n name: '"
|
|
|
+ routeName
|
|
|
- + "List',\n component: () => import(/* webpackChunkName: \"" + routePath + "Edit\" */ '@/views/"
|
|
|
+ + "List',\n component: () => import(/* webpackChunkName: \"" + routePath + "List\" */ '@/views/"
|
|
|
+ routeName
|
|
|
- + "List.vue')\n }\n ";
|
|
|
+ + "List.vue'),\n meta: {\n title: '" + remark + "',\n"
|
|
|
+ +" },\n }\n ";
|
|
|
boolean needComma = !routerJs.toString().substring(0, insertLocation).trim().endsWith(",");
|
|
|
if (needComma) {
|
|
|
routerJs.insert(routerJs.toString().substring(0, insertLocation).lastIndexOf("}") + 1, ",");
|