Browse Source

小优化

Administrator 2 years ago
parent
commit
26fc3ce64e
1 changed files with 4 additions and 0 deletions
  1. 4 0
      util/MysqlCreateVue.go

+ 4 - 0
util/MysqlCreateVue.go

@@ -277,6 +277,10 @@ func MysqlToVueView(table GTable, columns []GenTableColumn) string {
 			"\nfunction openDialog(type: string, row: " + table.GenTable.Name + ") {" +
 			"\n  open.value = true" +
 			"\n  dialogType.value = type" +
+			"\n\tif (type===\"save\"){" +
+			"\n    dialogForm.value = " + table.GenTable.Name + ".Create()" +
+			"\n    return" +
+			"\n  }" +
 			"\n  //深拷贝,不会影响数据" +
 			"\n  dialogForm.value = JSON.parse(JSON.stringify(row))" +
 			"\n" +