Ver código fonte

代码生成主子表优化

Ricky 3 anos atrás
pai
commit
2cd634a8de

+ 6 - 4
ruoyi-generator/src/main/resources/vm/html/add.html.vm

@@ -334,8 +334,9 @@
                         var name = $.common.sprintf("${subclassName}List[%s].${javaField}", index);
                         return $.common.dictToSelect(${javaField}Datas, value, name);
                     }
-                #if($foreach.count != $subTable.columns.size())},#end
-
+#if($foreach.count != $subTable.columns.size())
+                },
+#end
 #else
                 {
                     field: '${javaField}',
@@ -345,8 +346,9 @@
                         var html = $.common.sprintf("<input class='form-control' type='text' name='${subclassName}List[%s].${javaField}' value='%s'>", index, value);
                         return html;
                     }
-                #if($foreach.count != $subTable.columns.size())},#end
-
+#if($foreach.count != $subTable.columns.size())
+                },
+#end
 #end
 #end
                 }]

+ 6 - 4
ruoyi-generator/src/main/resources/vm/html/edit.html.vm

@@ -345,8 +345,9 @@
                         var name = $.common.sprintf("${subclassName}List[%s].${javaField}", index);
                         return $.common.dictToSelect(${javaField}Datas, value, name);
                     }
-                #if($foreach.count != $subTable.columns.size())},#end
-
+#if($foreach.count != $subTable.columns.size())
+                },
+#end
 #else
                 {
                     field: '${javaField}',
@@ -356,8 +357,9 @@
                         var html = $.common.sprintf("<input class='form-control' type='text' name='${subclassName}List[%s].${javaField}' value='%s'>", index, value);
                         return html;
                     }
-				#if($foreach.count != $subTable.columns.size())},#end
-
+#if($foreach.count != $subTable.columns.size())
+                },
+#end
 #end
 #end
                 }]