songzhibin97 4 years ago
parent
commit
9576ae9894
1 changed files with 2 additions and 2 deletions
  1. 2 2
      server/service/sys_auto_code.go

+ 2 - 2
server/service/sys_auto_code.go

@@ -200,9 +200,9 @@ func addAutoMoveFile(data *tplData) {
 		if strings.Contains(data.autoCodePath, "js") {
 			data.autoMoveFilePath = filepath.Join("../", "web", "src", dir, base)
 		} else if strings.Contains(data.autoCodePath, "form") {
-			data.autoMoveFilePath = filepath.Join("../", "web", "src", "view", filepath.Dir(dir), strings.TrimSuffix(base, filepath.Ext(base))+"From.vue")
+			data.autoMoveFilePath = filepath.Join("../", "web", "src", "view", filepath.Base(filepath.Dir(filepath.Dir(data.autoCodePath))), strings.TrimSuffix(base, filepath.Ext(base))+"From.vue")
 		} else if strings.Contains(data.autoCodePath, "table") {
-			data.autoMoveFilePath = filepath.Join("../", "web", "src", "view", filepath.Dir(dir), base)
+			data.autoMoveFilePath = filepath.Join("../", "web", "src", "view", filepath.Base(filepath.Dir(filepath.Dir(data.autoCodePath))), base)
 		}
 	}
 }